mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01:00
make Activity bool flags atomic
This commit is contained in:
@@ -113,7 +113,6 @@ public:
|
|||||||
void start(ThreadPool& pool)
|
void start(ThreadPool& pool)
|
||||||
{
|
{
|
||||||
FastMutex::ScopedLock lock(_mutex);
|
FastMutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
if (!_running)
|
if (!_running)
|
||||||
{
|
{
|
||||||
_done.reset();
|
_done.reset();
|
||||||
@@ -135,7 +134,6 @@ public:
|
|||||||
/// Requests to stop the activity.
|
/// Requests to stop the activity.
|
||||||
{
|
{
|
||||||
FastMutex::ScopedLock lock(_mutex);
|
FastMutex::ScopedLock lock(_mutex);
|
||||||
|
|
||||||
_stopped = true;
|
_stopped = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -195,8 +193,8 @@ private:
|
|||||||
|
|
||||||
C* _pOwner;
|
C* _pOwner;
|
||||||
RunnableAdapterType _runnable;
|
RunnableAdapterType _runnable;
|
||||||
volatile bool _stopped;
|
std::atomic<bool> _stopped;
|
||||||
volatile bool _running;
|
std::atomic<bool> _running;
|
||||||
Event _done;
|
Event _done;
|
||||||
FastMutex _mutex;
|
FastMutex _mutex;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user