 |
Newton Dynamics
4.00
|
|
22 #ifndef _D_SEMAPHORE_H_
23 #define _D_SEMAPHORE_H_
25 #include "dCoreStdafx.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 bool Wait()
Synchronize with another threads.
Definition: dSemaphore.cpp:49
D_CORE_API void Signal()
Notify a thread blocked by member function Wait to wake and test m_counter again.
Definition: dSemaphore.cpp:65
D_CORE_API ~dSemaphore()
Destroy semaphore.
Definition: dSemaphore.cpp:35
D_CORE_API dInt32 GetCount() const
Returns counter counter value.
Definition: dSemaphore.cpp:39
Generic counting semaphore for thread synchronization.
Definition: dSemaphore.h:29
D_CORE_API dSemaphore()
Create and initialize counter to zero.
Definition: dSemaphore.cpp:25
D_CORE_API void Terminate()
Notify a waiting thread on member function Wait that is time to exit the thread loop.
Definition: dSemaphore.cpp:74