Add assertion to ManualEvent to check for failure of creating event handles.
This commit is contained in:
parent
0895cd1960
commit
e3c680b0ce
|
@ -923,8 +923,10 @@ struct ManualEvent {
|
||||||
|
|
||||||
() @trusted { logTrace("wait shared %s", cast(void*)&this); } ();
|
() @trusted { logTrace("wait shared %s", cast(void*)&this); } ();
|
||||||
|
|
||||||
if (ms_threadEvent is EventID.invalid)
|
if (ms_threadEvent is EventID.invalid) {
|
||||||
ms_threadEvent = eventDriver.events.create();
|
ms_threadEvent = eventDriver.events.create();
|
||||||
|
assert(ms_threadEvent != EventID.invalid, "Failed to create event!");
|
||||||
|
}
|
||||||
|
|
||||||
SysTime target_timeout, now;
|
SysTime target_timeout, now;
|
||||||
if (timeout != Duration.max) {
|
if (timeout != Duration.max) {
|
||||||
|
|
Loading…
Reference in a new issue