Fixup for the previous timer fix.

This commit is contained in:
Sönke Ludwig 2017-01-30 20:12:37 +01:00
parent f5c2177c5d
commit d9c373419a
No known key found for this signature in database
GPG key ID: D95E8DB493EE314C

View file

@ -886,9 +886,10 @@ Timer createTimer(void delegate() nothrow @safe callback)
auto ret = Timer(eventDriver.timers.create());
if (callback !is null) {
runTask((void delegate() nothrow @safe cb, Timer tm) {
while (!tm.unique || tm.pending)
while (!tm.unique || tm.pending) {
tm.wait();
cb();
cb();
}
}, callback, ret);
}
return ret;