summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/IsThread.cpp
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2018-07-22 23:35:58 +0200
committerGitHub <noreply@github.com>2018-07-22 23:35:58 +0200
commit7b431bed513db3318811698029304d81e5831ab3 (patch)
treea05eec7426d42f0d194f538292559e3da189c13d /src/OSSupport/IsThread.cpp
parentMake offline UUIDs consistent with vanilla. (#4178) (diff)
downloadcuberite-7b431bed513db3318811698029304d81e5831ab3.tar
cuberite-7b431bed513db3318811698029304d81e5831ab3.tar.gz
cuberite-7b431bed513db3318811698029304d81e5831ab3.tar.bz2
cuberite-7b431bed513db3318811698029304d81e5831ab3.tar.lz
cuberite-7b431bed513db3318811698029304d81e5831ab3.tar.xz
cuberite-7b431bed513db3318811698029304d81e5831ab3.tar.zst
cuberite-7b431bed513db3318811698029304d81e5831ab3.zip
Diffstat (limited to '')
-rw-r--r--src/OSSupport/IsThread.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/OSSupport/IsThread.cpp b/src/OSSupport/IsThread.cpp
index 3f75951ba..d60d0d9eb 100644
--- a/src/OSSupport/IsThread.cpp
+++ b/src/OSSupport/IsThread.cpp
@@ -60,8 +60,7 @@ cIsThread::cIsThread(const AString & a_ThreadName) :
cIsThread::~cIsThread()
{
- m_ShouldTerminate = true;
- Wait();
+ Stop();
}
@@ -110,14 +109,9 @@ bool cIsThread::Start(void)
void cIsThread::Stop(void)
{
- if (!m_Thread.joinable())
- {
- // The thread hasn't been started or has already been joined
- return;
- }
-
m_ShouldTerminate = true;
Wait();
+ m_ShouldTerminate = false;
}