diff options
author | Max Kellermann <max@musicpd.org> | 2017-12-22 12:02:44 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-12-22 12:02:44 +0100 |
commit | 4319dedb239e65f16a0ec21153eae0a534e9b5da (patch) | |
tree | 018a9579ca8916e9f62bb2afb89502e91aa20130 | |
parent | f8bb66b4e0e90438b15bbfdd73e54973cf2d6ad1 (diff) |
db/update/Walk: use std::atomic_bool for the "quit" variable
Fixes thread sanitizer warnings.
-rw-r--r-- | src/db/update/Walk.hxx | 4 |
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; |