Don't exit event loop prematurely. Fixes #66.
Idle processing needs to check whether there are still tasks scheduled to be resumed before setting the exit flag when there are no more waiters (I/O etc.).
This commit is contained in:
parent
c88964337a
commit
66c9aeea57
|
@ -1140,8 +1140,8 @@ package(vibe) void performIdleProcessing()
|
|||
|
||||
if (again) {
|
||||
auto er = eventDriver.core.processEvents(0.seconds);
|
||||
if (er.among!(ExitReason.exited, ExitReason.outOfWaiters)) {
|
||||
logDebug("Setting exit flag due to driver signalling exit");
|
||||
if (er.among!(ExitReason.exited, ExitReason.outOfWaiters) && s_scheduler.scheduledTaskCount == 0) {
|
||||
logDebug("Setting exit flag due to driver signalling exit: %s", er);
|
||||
s_exitEventLoop = true;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue