Fixup for the previous timer fix.
This commit is contained in:
parent
f5c2177c5d
commit
d9c373419a
|
@ -886,9 +886,10 @@ Timer createTimer(void delegate() nothrow @safe callback)
|
||||||
auto ret = Timer(eventDriver.timers.create());
|
auto ret = Timer(eventDriver.timers.create());
|
||||||
if (callback !is null) {
|
if (callback !is null) {
|
||||||
runTask((void delegate() nothrow @safe cb, Timer tm) {
|
runTask((void delegate() nothrow @safe cb, Timer tm) {
|
||||||
while (!tm.unique || tm.pending)
|
while (!tm.unique || tm.pending) {
|
||||||
tm.wait();
|
tm.wait();
|
||||||
cb();
|
cb();
|
||||||
|
}
|
||||||
}, callback, ret);
|
}, callback, ret);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue