11#include <condition_variable>
23 mutable std::mutex _m;
24 mutable std::condition_variable _cv;
48 template <
typename... Event,
typename = std::enable_if_t<std::conjunction_v<std::is_same<Event, ManualEvent>...>> >
51 std::array eventsArr{(&events)...};
52 return WaitForAllSignals(timeoutMs, minTimeoutMs, eventsArr.data(), eventsArr.size());
Manual Event object, useful for signaling other threads about an event.
Definition ManualEvent.hpp:20
static bool WaitForAllSignals(int timeoutMs, int minTimeoutMs, Event &... events)
Waits for all events to be signaled, or for timeout.
Definition ManualEvent.hpp:49
void Reset()
Reset the event signal to false and force any threads waiting on WaitForSignal() to time out.
static bool WaitForAllSignals(int timeoutMs, int minTimeoutMs, ManualEvent *const *events, size_t eventCnt)
Waits for all events to be signaled, or for timeout.
void Clear()
Clear the event signal without signaling other threads.
void Signal()
Signal the event.
ManualEvent(bool initialSignal=false)
bool WaitForSignal(int timeoutMs) const
Wait for event to be signaled, or for timeout.
#define CTREXPORT
Definition export.h:14
Definition StatusCodes.h:18