diff --git a/src/threading/BasicThread.h b/src/threading/BasicThread.h index 3c5d3de1e8..f665462cbe 100644 --- a/src/threading/BasicThread.h +++ b/src/threading/BasicThread.h @@ -4,6 +4,7 @@ #include "zeek/zeek-config.h" #include +#include #include #include @@ -201,8 +202,8 @@ private: const char* name; std::thread thread; bool started; // Set to to true once running. - bool terminating; // Set to to true to signal termination. - bool killed; // Set to true once forcefully killed. + std::atomic_bool terminating; // Set to to true to signal termination. + std::atomic_bool killed; // Set to true once forcefully killed. // For implementing Fmt(). uint32_t buf_len;