Merge pull request #67 from vibe-d/issue_66_yield_exit_eventloop
Don't exit event loop prematurely.
This commit is contained in:
commit
a1a0d52fe6
2 changed files with 21 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue