diff options
author | Max Kellermann <max@musicpd.org> | 2017-12-22 11:04:24 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-12-22 11:04:24 +0100 |
commit | f8bb66b4e0e90438b15bbfdd73e54973cf2d6ad1 (patch) | |
tree | 2e7cff463a08e0350d9119ae7f17861da5aab4dd /src/event/Loop.hxx | |
parent | 5d6a8b384004e4ceaebc933973319d6a5e20ccea (diff) |
event/Loop: use std::atomic_bool for the "quit" variable
Fixes thread sanitizer warnings.
Diffstat (limited to 'src/event/Loop.hxx')
-rw-r--r-- | src/event/Loop.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/event/Loop.hxx b/src/event/Loop.hxx index 7b9ec69e4..1d516020d 100644 --- a/src/event/Loop.hxx +++ b/src/event/Loop.hxx @@ -36,6 +36,7 @@ #include <boost/intrusive/list.hpp> #include <chrono> +#include <atomic> #include <assert.h> @@ -85,7 +86,7 @@ class EventLoop final : SocketMonitor std::chrono::steady_clock::time_point now = std::chrono::steady_clock::now(); - bool quit = false; + std::atomic_bool quit; /** * True when the object has been modified and another check is |