 |
Newton Dynamics
4.00
|
|
22 #ifndef __ND_THREAD_H_
23 #define __ND_THREAD_H_
25 #include "ndCoreStdafx.h"
26 #include "ndSemaphore.h"
27 #include "ndClassAlloc.h"
34 strcpy(m_name,
"newtonWorker");
44 #ifndef D_USE_THREAD_EMULATION
46 ,
public std::condition_variable
61 D_CORE_API
void SetName(
const char*
const name);
78 virtual void Release(){}
81 void ThreadFunctionCallback();
Base class for providing memory allocation for all other engine classes.
Definition: ndClassAlloc.h:30
Base class for for all multi thread functionality.
Definition: ndThread.h:49
Definition: ndThread.h:30
D_CORE_API ndThread()
Empty default constructor after creation all threads go to a wait state.
Definition: ndThread.cpp:33
D_CORE_API void SetName(const char *const name)
Set thread name.
Definition: ndThread.cpp:57
virtual void ThreadFunction()=0
Thread function to execute in a perpetual loop until the thread is terminated.
virtual D_CORE_API ~ndThread()
Empty, does not terminate the thread loop.
Definition: ndThread.cpp:53
D_CORE_API void Finish()
Force the thread loop to terminate.
Definition: ndThread.cpp:90
Generic counting semaphore for thread synchronization.
Definition: ndSemaphore.h:29
D_CORE_API void Signal()
Set the thread, to execute one call to and go back to a wait state
Definition: ndThread.cpp:98
wrapper over standard atomic operations
Definition: ndTypes.h:381