Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
@@ -1170,7 +1170,7 @@ class CLdapWorkItem : public Thread
Linked<IUserDescriptor> udesc;
Linked<IDaliLdapConnection> ldapconn;
unsigned flags;
- bool running;
+ std::atomic<bool> running;
Semaphore contsem;
Semaphore ready;
Semaphore &threaddone;
@@ -141,7 +141,7 @@ interface IHThorDebugSocketListener : extends IInterface
class CHThorDebugSocketListener : public Thread, implements IHThorDebugSocketListener, implements IThreadFactory
{
unsigned port;
bool suspended;
Semaphore started;
Owned<ISocket> socket;
@@ -915,7 +915,7 @@ class EclccServer : public CInterface, implements IThreadFactory, implements IAb
unsigned threadsActive;
CriticalSection threadActiveCrit;
CSDSServerStatus serverstatus;
Owned<IJobQueue> queue;
CriticalSection queueUpdateCS;
@@ -865,7 +865,7 @@ public:
protected:
unsigned poolSize;
Owned<IThreadPool> pool;
@@ -181,7 +181,7 @@ public:
}
@@ -638,7 +638,7 @@ class CSendManager : implements ISendManager, public CInterface
return doRun();
public:
StartedThread(const char *name) : Thread(name)
@@ -146,7 +146,7 @@ unsigned SendAsFastAsPossible::totalSent = 0;
class Receiver : public Thread
offset_t allReceived;
CriticalSection arsect;
@@ -442,7 +442,7 @@ class CMPChannel;
class CMPConnectThread: public Thread
bool listen;
ISocket *listensock;
CMPServer *parent;
@@ -61,7 +61,7 @@ class CRowStreamLookAhead : public CSimpleInterfaceOf<IStartableEngineRowStream>
CSlaveActivity &activity;
bool allowspill, preserveGrouping;
ILookAheadStopNotify *notify;
- bool running = false;
+ std::atomic<bool> running{false};
bool started = false;
rowcount_t required;
Semaphore startSem;
@@ -80,7 +80,7 @@ class CJobManager : public CSimpleInterface, implements IJobManager, implements
Owned<ISocket> sock;
CJobManager &mgr;
private:
- volatile bool running;
CThorDebugListener(CJobManager &_mgr) : threaded("CThorDebugListener", this), mgr(_mgr)
@@ -151,7 +151,7 @@ class CRegistryServer : public CSimpleInterface
CThreaded threaded;
CRegistryServer ®istry;
CDeregistrationWatch(CRegistryServer &_registry) : threaded("CDeregistrationWatch"), registry(_registry), running(false) { }
~CDeregistrationWatch()
@@ -1264,7 +1264,7 @@ class CRowServer : public CSimpleInterface, implements IThreaded, implements IRo
mptag_t mpTag;
unsigned fetchBuffSize;
Linked<IRowStream> seq;
IMPLEMENT_IINTERFACE_USING(CSimpleInterface);
@@ -219,7 +219,7 @@ public:
class graph_decl CTimeoutTrigger : public CInterface, implements IThreaded
Semaphore todo;
CriticalSection crit;
unsigned timeout;