mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add Stoppable to beast
This commit is contained in:
@@ -307,6 +307,7 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Listeners.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\ManualCallQueue.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Semaphore.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Stoppable.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\ThreadWithCallQueue.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Workers.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\detail\ScopedLock.h" />
|
||||
@@ -1138,6 +1139,12 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\Stoppable.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\ThreadWithCallQueue.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
|
||||
@@ -1101,6 +1101,9 @@
|
||||
<ClInclude Include="..\..\beast\mpl\CopyConst.h">
|
||||
<Filter>beast\mpl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\Stoppable.h">
|
||||
<Filter>beast_core\thread</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\modules\beast_core\containers\AbstractFifo.cpp">
|
||||
@@ -1631,6 +1634,9 @@
|
||||
<ClCompile Include="..\..\modules\beast_asio\http\HTTPRequest.cpp">
|
||||
<Filter>beast_asio\http</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\thread\Stoppable.cpp">
|
||||
<Filter>beast_core\thread</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\TODO.txt">
|
||||
|
||||
@@ -206,6 +206,7 @@ namespace beast
|
||||
#include "thread/impl/TrackedMutex.cpp"
|
||||
#include "thread/DeadlineTimer.cpp"
|
||||
#include "thread/InterruptibleThread.cpp"
|
||||
#include "thread/Stoppable.cpp"
|
||||
#include "thread/Semaphore.cpp"
|
||||
#include "thread/CallQueue.cpp"
|
||||
#include "thread/Listeners.cpp"
|
||||
|
||||
@@ -90,6 +90,7 @@ extern BEAST_API void BEAST_CALLTYPE logAssertion (char const* file, int line) n
|
||||
#include "../../beast/Net.h"
|
||||
#include "../../beast/TypeTraits.h"
|
||||
#include "../../beast/Thread.h"
|
||||
#include "../../beast/Utility.h"
|
||||
|
||||
namespace beast {
|
||||
|
||||
@@ -269,6 +270,7 @@ class FileOutputStream;
|
||||
|
||||
#include "thread/Semaphore.h"
|
||||
#include "thread/InterruptibleThread.h"
|
||||
#include "thread/Stoppable.h"
|
||||
#include "thread/CallQueue.h"
|
||||
#include "thread/Listeners.h"
|
||||
#include "thread/ManualCallQueue.h"
|
||||
|
||||
@@ -4,9 +4,6 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
namespace ripple
|
||||
{
|
||||
|
||||
Stoppable::Stoppable (char const* name, Stoppable& parent)
|
||||
: m_name (name)
|
||||
, m_root (false)
|
||||
@@ -165,5 +162,3 @@ void Stoppable::stopRecursive (Journal::Stream stream)
|
||||
// once we get here, we know the stoppable has stopped.
|
||||
m_stopped = true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,18 +1,24 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (c) 2011-2013, OpenCoin, Inc.
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef RIPPLE_FRAME_STOPPABLE_H_INCLUDED
|
||||
#define RIPPLE_FRAME_STOPPABLE_H_INCLUDED
|
||||
|
||||
#include "../../../beast/beast/utility/Journal.h"
|
||||
|
||||
namespace ripple
|
||||
{
|
||||
|
||||
using namespace beast;
|
||||
#ifndef BEAST_CORE_STOPPABLE_H_INCLUDED
|
||||
#define BEAST_CORE_STOPPABLE_H_INCLUDED
|
||||
|
||||
/** Provides an interface for stopping.
|
||||
|
||||
@@ -255,6 +261,4 @@ private:
|
||||
WaitableEvent m_stoppedEvent;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -14,4 +14,3 @@
|
||||
#include "ripple_frame.h"
|
||||
|
||||
#include "api/RPCService.cpp"
|
||||
#include "api/Stoppable.cpp"
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
|
||||
#include "../json/ripple_json.h"
|
||||
|
||||
#include "api/Stoppable.h"
|
||||
#include "api/RPCService.h"
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user