Add assertion to ManualEvent to check for failure of creating event handles.

This commit is contained in:
Sönke Ludwig 2017-03-27 16:32:24 +02:00
parent 0895cd1960
commit e3c680b0ce
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C

View file

@ -923,8 +923,10 @@ struct ManualEvent {
() @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();
assert(ms_threadEvent != EventID.invalid, "Failed to create event!");
}
SysTime target_timeout, now;
if (timeout != Duration.max) {