Reduce Beast dependencies by leveraging C++11 features:

* Remove beast::Atomic (RIPD-728):
  * Use std-provided alternatives
  * Eliminate atomic variables where possible

* Cleanup beast::Thread interface:
  * Use std::string instead of beast::String
  * Remove unused functions and parameters

* Remove unused code:
  * beast::ThreadLocalValue
  * beast::ServiceQueue
This commit is contained in:
Nik Bougalis
2014-12-22 02:45:36 -08:00
parent 60bdc79ec4
commit d26fae9875
25 changed files with 83 additions and 2315 deletions

View File

@@ -158,8 +158,6 @@
</ClCompile>
<ClInclude Include="..\..\src\beast\beast\asio\waitable_executor.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\Atomic.h">
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\boost\Boost.unity.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
@@ -849,16 +847,9 @@
</ClCompile>
<ClInclude Include="..\..\src\beast\beast\Threads.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\detail\BindHandler.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\detail\DispatchedHandler.h">
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\threads\impl\RecursiveMutex.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\beast\beast\threads\impl\ServiceQueue.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\beast\beast\threads\impl\Stoppable.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
@@ -877,8 +868,6 @@
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\semaphore.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\ServiceQueue.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\SharedData.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\SharedLockGuard.h">
@@ -889,13 +878,8 @@
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\Stoppable.h">
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\threads\tests\ServiceQueue.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClInclude Include="..\..\src\beast\beast\threads\Thread.h">
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\ThreadLocalValue.h">
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\threads\Threads.unity.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
@@ -2135,6 +2119,8 @@
<ClCompile Include="..\..\src\ripple\basics\impl\CheckLibraryVersions.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClInclude Include="..\..\src\ripple\basics\impl\CheckLibraryVersionsImpl.h">
</ClInclude>
<ClCompile Include="..\..\src\ripple\basics\impl\CountedObject.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
@@ -2162,6 +2148,9 @@
<ClCompile Include="..\..\src\ripple\basics\impl\TaggedCache.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\ripple\basics\impl\TestSuite.test.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\ripple\basics\impl\ThreadName.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
@@ -2199,6 +2188,11 @@
</ClInclude>
<ClInclude Include="..\..\src\ripple\basics\TaggedCache.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\basics\TestSuite.h">
</ClInclude>
<ClCompile Include="..\..\src\ripple\basics\tests\CheckLibraryVersions.test.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClInclude Include="..\..\src\ripple\basics\ThreadName.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\basics\Time.h">
@@ -3185,19 +3179,6 @@
</ClCompile>
<ClInclude Include="..\..\src\ripple\server\Writer.h">
</ClInclude>
<ClInclude Include="..\..\src\ripple\sitefiles\impl\Logic.h">
</ClInclude>
<ClCompile Include="..\..\src\ripple\sitefiles\impl\Manager.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\ripple\sitefiles\impl\Section.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\src\ripple\sitefiles\impl\SiteFile.cpp">
<ExcludedFromBuild>True</ExcludedFromBuild>
</ClCompile>
<ClInclude Include="..\..\src\ripple\sitefiles\Sitefiles.h">
</ClInclude>
<ClCompile Include="..\..\src\ripple\unity\app.cpp">
</ClCompile>
<ClInclude Include="..\..\src\ripple\unity\app.h">
@@ -3272,8 +3253,6 @@
</ClCompile>
<ClCompile Include="..\..\src\ripple\unity\server.cpp">
</ClCompile>
<ClCompile Include="..\..\src\ripple\unity\sitefiles.cpp">
</ClCompile>
<ClCompile Include="..\..\src\ripple\unity\snappy.cpp">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='debug|x64'">..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='release|x64'">..\..\src\snappy\config;..\..\src\snappy\snappy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>

View File

@@ -181,15 +181,9 @@
<Filter Include="beast\threads">
<UniqueIdentifier>{08F944AB-789E-3C7A-6322-D7567E6B5060}</UniqueIdentifier>
</Filter>
<Filter Include="beast\threads\detail">
<UniqueIdentifier>{A265EF98-7D2F-4C8A-F555-DF2E473E2B73}</UniqueIdentifier>
</Filter>
<Filter Include="beast\threads\impl">
<UniqueIdentifier>{E8A9A46E-3151-7072-ADF1-C230D86E9791}</UniqueIdentifier>
</Filter>
<Filter Include="beast\threads\tests">
<UniqueIdentifier>{8F25D378-93AB-1151-163A-07BE27FB90F6}</UniqueIdentifier>
</Filter>
<Filter Include="beast\unit_test">
<UniqueIdentifier>{2762284D-66E5-8B48-1F8E-67116DB1FC6B}</UniqueIdentifier>
</Filter>
@@ -337,6 +331,9 @@
<Filter Include="ripple\basics\impl">
<UniqueIdentifier>{1B5E3484-E132-ADEA-8A38-01B0F4ABAC58}</UniqueIdentifier>
</Filter>
<Filter Include="ripple\basics\tests">
<UniqueIdentifier>{B1F0C3D5-71C4-3ABF-E292-F147387D07CB}</UniqueIdentifier>
</Filter>
<Filter Include="ripple\core">
<UniqueIdentifier>{235DCF23-2CF8-4F03-1A54-C159823A7E8D}</UniqueIdentifier>
</Filter>
@@ -430,12 +427,6 @@
<Filter Include="ripple\server\tests">
<UniqueIdentifier>{9BA46DD5-4B0C-3C1D-6F16-93DE8A9B7313}</UniqueIdentifier>
</Filter>
<Filter Include="ripple\sitefiles">
<UniqueIdentifier>{CB0AC82D-AEA3-F41C-847F-D6ECA4971891}</UniqueIdentifier>
</Filter>
<Filter Include="ripple\sitefiles\impl">
<UniqueIdentifier>{1D95DF26-0788-BD2C-2864-8B038A51FD58}</UniqueIdentifier>
</Filter>
<Filter Include="ripple\unity">
<UniqueIdentifier>{5DB3CD0B-B361-B301-9562-697CA8A52B68}</UniqueIdentifier>
</Filter>
@@ -615,9 +606,6 @@
<ClInclude Include="..\..\src\beast\beast\asio\waitable_executor.h">
<Filter>beast\asio</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\Atomic.h">
<Filter>beast</Filter>
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\boost\Boost.unity.cpp">
<Filter>beast\boost</Filter>
</ClCompile>
@@ -1491,18 +1479,9 @@
<ClInclude Include="..\..\src\beast\beast\Threads.h">
<Filter>beast</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\detail\BindHandler.h">
<Filter>beast\threads\detail</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\detail\DispatchedHandler.h">
<Filter>beast\threads\detail</Filter>
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\threads\impl\RecursiveMutex.cpp">
<Filter>beast\threads\impl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\beast\beast\threads\impl\ServiceQueue.cpp">
<Filter>beast\threads\impl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\beast\beast\threads\impl\Stoppable.cpp">
<Filter>beast\threads\impl</Filter>
</ClCompile>
@@ -1524,9 +1503,6 @@
<ClInclude Include="..\..\src\beast\beast\threads\semaphore.h">
<Filter>beast\threads</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\ServiceQueue.h">
<Filter>beast\threads</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\SharedData.h">
<Filter>beast\threads</Filter>
</ClInclude>
@@ -1542,15 +1518,9 @@
<ClInclude Include="..\..\src\beast\beast\threads\Stoppable.h">
<Filter>beast\threads</Filter>
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\threads\tests\ServiceQueue.cpp">
<Filter>beast\threads\tests</Filter>
</ClCompile>
<ClInclude Include="..\..\src\beast\beast\threads\Thread.h">
<Filter>beast\threads</Filter>
</ClInclude>
<ClInclude Include="..\..\src\beast\beast\threads\ThreadLocalValue.h">
<Filter>beast\threads</Filter>
</ClInclude>
<ClCompile Include="..\..\src\beast\beast\threads\Threads.unity.cpp">
<Filter>beast\threads</Filter>
</ClCompile>
@@ -3069,6 +3039,9 @@
<ClCompile Include="..\..\src\ripple\basics\impl\CheckLibraryVersions.cpp">
<Filter>ripple\basics\impl</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ripple\basics\impl\CheckLibraryVersionsImpl.h">
<Filter>ripple\basics\impl</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ripple\basics\impl\CountedObject.cpp">
<Filter>ripple\basics\impl</Filter>
</ClCompile>
@@ -3096,6 +3069,9 @@
<ClCompile Include="..\..\src\ripple\basics\impl\TaggedCache.cpp">
<Filter>ripple\basics\impl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ripple\basics\impl\TestSuite.test.cpp">
<Filter>ripple\basics\impl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ripple\basics\impl\ThreadName.cpp">
<Filter>ripple\basics\impl</Filter>
</ClCompile>
@@ -3147,6 +3123,12 @@
<ClInclude Include="..\..\src\ripple\basics\TaggedCache.h">
<Filter>ripple\basics</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\basics\TestSuite.h">
<Filter>ripple\basics</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ripple\basics\tests\CheckLibraryVersions.test.cpp">
<Filter>ripple\basics\tests</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ripple\basics\ThreadName.h">
<Filter>ripple\basics</Filter>
</ClInclude>
@@ -4329,21 +4311,6 @@
<ClInclude Include="..\..\src\ripple\server\Writer.h">
<Filter>ripple\server</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ripple\sitefiles\impl\Logic.h">
<Filter>ripple\sitefiles\impl</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ripple\sitefiles\impl\Manager.cpp">
<Filter>ripple\sitefiles\impl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ripple\sitefiles\impl\Section.cpp">
<Filter>ripple\sitefiles\impl</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ripple\sitefiles\impl\SiteFile.cpp">
<Filter>ripple\sitefiles\impl</Filter>
</ClCompile>
<ClInclude Include="..\..\src\ripple\sitefiles\Sitefiles.h">
<Filter>ripple\sitefiles</Filter>
</ClInclude>
<ClCompile Include="..\..\src\ripple\unity\app.cpp">
<Filter>ripple\unity</Filter>
</ClCompile>
@@ -4443,9 +4410,6 @@
<ClCompile Include="..\..\src\ripple\unity\server.cpp">
<Filter>ripple\unity</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ripple\unity\sitefiles.cpp">
<Filter>ripple\unity</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ripple\unity\snappy.cpp">
<Filter>ripple\unity</Filter>
</ClCompile>