summaryrefslogtreecommitdiffstats
path: root/src/SpawnPrepare.h
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2015-12-20 01:51:05 +0100
committerLukas Pioch <lukas@zgow.de>2015-12-20 01:51:05 +0100
commit27d6789a83b6752be89af5d1313ddb64c2bfc5ac (patch)
tree30dd68a59171a856782cd5732d1527fdeec78cc0 /src/SpawnPrepare.h
parentMerge pull request #2779 from cuberite/seadragon91-patch-clang-3.7 (diff)
parentFix race condition (diff)
downloadcuberite-27d6789a83b6752be89af5d1313ddb64c2bfc5ac.tar
cuberite-27d6789a83b6752be89af5d1313ddb64c2bfc5ac.tar.gz
cuberite-27d6789a83b6752be89af5d1313ddb64c2bfc5ac.tar.bz2
cuberite-27d6789a83b6752be89af5d1313ddb64c2bfc5ac.tar.lz
cuberite-27d6789a83b6752be89af5d1313ddb64c2bfc5ac.tar.xz
cuberite-27d6789a83b6752be89af5d1313ddb64c2bfc5ac.tar.zst
cuberite-27d6789a83b6752be89af5d1313ddb64c2bfc5ac.zip
Diffstat (limited to 'src/SpawnPrepare.h')
-rw-r--r--src/SpawnPrepare.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/SpawnPrepare.h b/src/SpawnPrepare.h
index cc0da504e..3f4a3b377 100644
--- a/src/SpawnPrepare.h
+++ b/src/SpawnPrepare.h
@@ -1,6 +1,8 @@
#pragma once
+#include <atomic>
+
class cWorld;
@@ -25,7 +27,7 @@ protected:
int m_MaxIdx;
/** Total number of chunks already finished preparing. Preparation finishes when this number reaches m_MaxIdx. */
- int m_NumPrepared;
+ std::atomic<int> m_NumPrepared;
/** Event used to signal that the preparation is finished. */
cEvent m_EvtFinished;