fix(core): wait for tasks to be scheduled before checking for work (#8840)
Ensure task are scheduled before checking if there is some work to do, else it can occur that tasks are scheduled, but no check for work is triggered until the next task completes. Closes #8888.
This commit is contained in:
parent
5bf37f00bd
commit
619a7e825e
@ -384,6 +384,10 @@ export class TaskOrchestrator {
|
||||
);
|
||||
|
||||
await this.tasksSchedule.scheduleNextTasks();
|
||||
|
||||
// release blocked threads
|
||||
this.waitingForTasks.forEach((f) => f(null));
|
||||
this.waitingForTasks.length = 0;
|
||||
}
|
||||
|
||||
private complete(
|
||||
@ -408,9 +412,6 @@ export class TaskOrchestrator {
|
||||
);
|
||||
}
|
||||
}
|
||||
this.waitingForTasks // release blocked threads
|
||||
.forEach((f) => f(null));
|
||||
this.waitingForTasks.length = 0;
|
||||
}
|
||||
|
||||
//endregion Lifecycle
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user