23 #include "condition.h" 34 CEvent(
bool autoReset =
true)
38 , m_autoReset(autoReset) {}
47 m_condition.Broadcast();
62 bool notified = m_condition.Wait(m_mutex, m_notified);
64 if (m_autoReset && notified)
69 bool Wait(
unsigned timeout)
73 bool notified = m_condition.Wait(m_mutex, m_notified, timeout);
75 if (m_autoReset && notified)
87 volatile bool m_notified;
88 volatile bool m_notifyOne;
89 unsigned m_waitingCount;
94 void __reset(
bool force)
96 if (force || m_waitingCount == 0)