From d01562cb7d124535654b3073f00f756e980c3e7a Mon Sep 17 00:00:00 2001 From: tycho Date: Fri, 18 Dec 2015 16:15:20 +0000 Subject: Use atomic bool for isthread terminate --- src/OSSupport/IsThread.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 +#include @@ -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 m_ShouldTerminate; public: cIsThread(const AString & a_ThreadName); -- cgit v1.2.3