summaryrefslogtreecommitdiffstats
path: root/src/OSSupport
diff options
context:
space:
mode:
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;
}