summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/IsThread.h
diff options
context:
space:
mode:
authortycho <work.tycho@gmail.com>2015-12-18 17:15:20 +0100
committerMattes D <github@xoft.cz>2015-12-19 19:29:06 +0100
commitd01562cb7d124535654b3073f00f756e980c3e7a (patch)
tree46849e4b4997588211fce608396dc33a935b1f29 /src/OSSupport/IsThread.h
parentMerge pull request #2778 from cuberite/httpschanges (diff)
downloadcuberite-d01562cb7d124535654b3073f00f756e980c3e7a.tar
cuberite-d01562cb7d124535654b3073f00f756e980c3e7a.tar.gz
cuberite-d01562cb7d124535654b3073f00f756e980c3e7a.tar.bz2
cuberite-d01562cb7d124535654b3073f00f756e980c3e7a.tar.lz
cuberite-d01562cb7d124535654b3073f00f756e980c3e7a.tar.xz
cuberite-d01562cb7d124535654b3073f00f756e980c3e7a.tar.zst
cuberite-d01562cb7d124535654b3073f00f756e980c3e7a.zip
Diffstat (limited to '')
-rw-r--r--src/OSSupport/IsThread.h3
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);