summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2017-12-22 12:02:44 +0100
committerMax Kellermann <max@musicpd.org>2017-12-22 12:02:44 +0100
commit4319dedb239e65f16a0ec21153eae0a534e9b5da (patch)
tree018a9579ca8916e9f62bb2afb89502e91aa20130
parentf8bb66b4e0e90438b15bbfdd73e54973cf2d6ad1 (diff)
db/update/Walk: use std::atomic_bool for the "quit" variable
Fixes thread sanitizer warnings.
-rw-r--r--src/db/update/Walk.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/db/update/Walk.hxx b/src/db/update/Walk.hxx
index cdc42f4b8..151cdf957 100644
--- a/src/db/update/Walk.hxx
+++ b/src/db/update/Walk.hxx
@@ -24,6 +24,8 @@
#include "Editor.hxx"
#include "Compiler.h"
+#include <atomic>
+
struct StorageFileInfo;
struct Directory;
struct ArchivePlugin;
@@ -52,7 +54,7 @@ class UpdateWalk final {
* cancel as quickly as possible. Access to this flag is
* unprotected.
*/
- volatile bool cancel;
+ std::atomic_bool cancel;
Storage &storage;