Add a volatile on the stop flag in the thread pool

This commit is contained in:
Paul Ferrand 2020-09-21 09:21:06 +02:00
parent a505b9f037
commit d35ff4eb42

View file

@ -29,7 +29,7 @@ private:
// synchronization
std::mutex queue_mutex;
std::condition_variable condition;
bool stop;
volatile bool stop;
};
// the constructor just launches some amount of workers