diff --git a/packages/workspace/src/tasks-runner/task-orchestrator.ts b/packages/workspace/src/tasks-runner/task-orchestrator.ts index 5334e43e31..24ea9c2d71 100644 --- a/packages/workspace/src/tasks-runner/task-orchestrator.ts +++ b/packages/workspace/src/tasks-runner/task-orchestrator.ts @@ -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