Add a volatile on the stop flag in the thread pool
This commit is contained in:
parent
a505b9f037
commit
d35ff4eb42
1 changed files with 1 additions and 1 deletions
2
src/external/threadpool/ThreadPool.h
vendored
2
src/external/threadpool/ThreadPool.h
vendored
|
|
@ -29,7 +29,7 @@ private:
|
||||||
// synchronization
|
// synchronization
|
||||||
std::mutex queue_mutex;
|
std::mutex queue_mutex;
|
||||||
std::condition_variable condition;
|
std::condition_variable condition;
|
||||||
bool stop;
|
volatile bool stop;
|
||||||
};
|
};
|
||||||
|
|
||||||
// the constructor just launches some amount of workers
|
// the constructor just launches some amount of workers
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue