diff options
author | Lukas Pioch <lukas@zgow.de> | 2015-12-19 20:17:29 +0100 |
---|---|---|
committer | Lukas Pioch <lukas@zgow.de> | 2015-12-19 20:17:29 +0100 |
commit | 60dec884e49576a0c73c5ad223475605556ea23f (patch) | |
tree | 46849e4b4997588211fce608396dc33a935b1f29 /src | |
parent | Merge pull request #2778 from cuberite/httpschanges (diff) | |
parent | Use atomic bool for isthread terminate (diff) | |
download | cuberite-60dec884e49576a0c73c5ad223475605556ea23f.tar cuberite-60dec884e49576a0c73c5ad223475605556ea23f.tar.gz cuberite-60dec884e49576a0c73c5ad223475605556ea23f.tar.bz2 cuberite-60dec884e49576a0c73c5ad223475605556ea23f.tar.lz cuberite-60dec884e49576a0c73c5ad223475605556ea23f.tar.xz cuberite-60dec884e49576a0c73c5ad223475605556ea23f.tar.zst cuberite-60dec884e49576a0c73c5ad223475605556ea23f.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/OSSupport/IsThread.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/OSSupport/IsThread.h b/src/OSSupport/IsThread.h index fa6813cd7..0c28f5623 100644 --- a/src/OSSupport/IsThread.h +++ b/src/OSSupport/IsThread.h @@ -17,6 +17,7 @@ In the descending class' constructor call the Start() method to start the thread #pragma once #include <thread> +#include <atomic> @@ -30,7 +31,7 @@ protected: virtual void Execute(void) = 0; /** The overriden Execute() method should check this value periodically and terminate if this is true. */ - volatile bool m_ShouldTerminate; + std::atomic<bool> m_ShouldTerminate; public: cIsThread(const AString & a_ThreadName); |