mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-27 02:53:10 +01:00
make Activity bool flags atomic
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user