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