27 : useManualReset (manualReset)
33 std::unique_lock<std::mutex> lock (mutex);
37 if (timeOutMilliseconds < 0)
39 condition.wait (lock, [
this] {
return triggered ==
true; });
43 if (! condition.wait_for (lock, std::chrono::milliseconds (timeOutMilliseconds),
44 [
this] { return triggered == true; }))
59 std::unique_lock<std::mutex> lock (mutex);
62 condition.notify_all();
WaitableEvent(bool manualReset=false) noexcept
Creates a WaitableEvent object.
bool wait(int timeOutMilliseconds=-1) const
Suspends the calling thread until the event has been signalled.
void signal() const
Wakes up any threads that are currently waiting on this object.
void reset() const
Resets the event to an unsignalled state.