From f8bb66b4e0e90438b15bbfdd73e54973cf2d6ad1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 22 Dec 2017 11:04:24 +0100 Subject: event/Loop: use std::atomic_bool for the "quit" variable Fixes thread sanitizer warnings. --- src/event/Loop.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/event/Loop.hxx') 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 #include +#include #include @@ -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 -- cgit v1.2.3