51 this->
event =
CreateEvent(NULL, manualReset, FALSE, NULL);
52 this->
manual = manualReset;
63 CloseHandle(this->
event);
64 this->
event = rhs.event;
75 if (this->
event !=
nullptr)
77 CloseHandle(this->
event);
78 this->
event =
nullptr;
88 SetEvent(this->
event);
97 ResetEvent(this->
event);
106 WaitForSingleObject(this->
event, INFINITE);
119 DWORD res = WaitForSingleObject(this->
event, timeoutInMilliSec);
120 return (WAIT_TIMEOUT == res) ? false :
true;
130 DWORD res = WaitForSingleObject(this->
event, 0);
131 return (WAIT_TIMEOUT == res) ? false :
true;
Win32 implementation of an event synchronization object.
Definition win32event.h:18
bool manual
Definition win32event.h:41
~Win32Event()
destructor
Definition win32event.h:73
HANDLE event
Definition win32event.h:42
bool IsManual() const
Returns true if event is manually reset.
Definition win32event.h:138
Win32Event(bool manualReset=false)
constructor
Definition win32event.h:49
void Wait() const
wait for the event to become signalled
Definition win32event.h:104
void Signal()
signal the event
Definition win32event.h:86
bool Peek() const
check if event is signalled
Definition win32event.h:128
void Reset()
reset the event (only if manual reset)
Definition win32event.h:95
bool WaitTimeout(int ms) const
wait for the event with timeout in millisecs
Definition win32event.h:117
#define n_assert(exp)
Definition debug.h:50
EventId CreateEvent(const EventCreateInfo &info)
create new event
Definition vkevent.cc:42
[TODO: Describe Win32 subsystem]