Wait this semaphore until it owns equal sign with given.
- Parameters
-
Definition at line 57 of file Semaphore.h.
58 {
60 {
61 std::unique_lock<std::mutex> lock(
m_Mutex);
62
63 m_Cond.wait(lock, [&]() {
return m_Sign.load() == sign; });
64 }
65 }
std::mutex m_Mutex
Mutex of this semaphore.
std::atomic_int m_Sign
Sign of this semaphore.
std::condition_variable m_Cond
condition variable of this semaphore.
Referenced by SpicesTest::TEST().