 |
Newton Dynamics
4.00
|
|
22 #ifndef __ND_SEMAPHORE_H_
23 #define __ND_SEMAPHORE_H_
25 #include "ndCoreStdafx.h"
47 D_CORE_API
bool Wait();
56 #ifndef D_USE_THREAD_EMULATION
58 mutable std::mutex m_mutex;
59 std::condition_variable m_condition;
D_CORE_API void Terminate()
Notify a waiting thread on member function Wait that is time to exit the thread loop.
Definition: ndSemaphore.cpp:74
D_CORE_API ndSemaphore()
Create and initialize counter to zero.
Definition: ndSemaphore.cpp:25
D_CORE_API bool Wait()
Synchronize with another threads.
Definition: ndSemaphore.cpp:49
D_CORE_API ndInt32 GetCount() const
Returns counter counter value.
Definition: ndSemaphore.cpp:39
D_CORE_API void Signal()
Notify a thread blocked by member function Wait to wake and test m_counter again.
Definition: ndSemaphore.cpp:65
Generic counting semaphore for thread synchronization.
Definition: ndSemaphore.h:29
D_CORE_API ~ndSemaphore()
Destroy semaphore.
Definition: ndSemaphore.cpp:35