replace bool with atomic<bool>

fix usage of bool without sync between threads.
pull/1459/head
Guy Kroizman 6 years ago committed by GitHub
parent 0120dcc787
commit 8494e91f22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -27,7 +27,7 @@ public:
~periodic_worker();
private:
bool active_;
std::atomic<bool> active_;
std::thread worker_thread_;
std::mutex mutex_;
std::condition_variable cv_;

Loading…
Cancel
Save