34 Event(
bool autoReset =
true)
38 , m_autoReset(autoReset) {}
47 m_condition.notify_all();
55 m_condition.notify_one();
62 bool notified = m_condition.wait(m_mutex, m_notified);
64 if (m_autoReset && notified)
69 bool wait_for(
unsigned millisec)
73 bool notified = m_condition.wait_for(m_mutex, millisec, m_notified);
75 if (m_autoReset && notified)
87 Event(
const Event& other) =
delete;
88 Event& operator=(
const Event& other) =
delete;
91 volatile bool m_notified;
92 volatile bool m_notifyOne;
93 unsigned m_waitingCount;
98 void __reset(
bool force)
100 if (force || m_waitingCount == 0)