Commit 4319dedb authored by Max Kellermann's avatar Max Kellermann

db/update/Walk: use std::atomic_bool for the "quit" variable

Fixes thread sanitizer warnings.
parent f8bb66b4
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include "Editor.hxx" #include "Editor.hxx"
#include "Compiler.h" #include "Compiler.h"
#include <atomic>
struct StorageFileInfo; struct StorageFileInfo;
struct Directory; struct Directory;
struct ArchivePlugin; struct ArchivePlugin;
...@@ -52,7 +54,7 @@ class UpdateWalk final { ...@@ -52,7 +54,7 @@ class UpdateWalk final {
* cancel as quickly as possible. Access to this flag is * cancel as quickly as possible. Access to this flag is
* unprotected. * unprotected.
*/ */
volatile bool cancel; std::atomic_bool cancel;
Storage &storage; Storage &storage;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment