From 79b197bb222403411621c41775d9d640f4150633 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 26 Aug 2023 16:29:57 +0200 Subject: [PATCH] perf: stop continuous task stealing at task executing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/worker-node.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pools/worker-node.ts b/src/pools/worker-node.ts index fbd00096..079881b9 100644 --- a/src/pools/worker-node.ts +++ b/src/pools/worker-node.ts @@ -180,8 +180,7 @@ implements IWorkerNode { private async startOnEmptyQueue (): Promise { if ( this.onEmptyQueueCount > 0 && - this.usage.tasks.executing > 0 && - this.tasksQueue.size > 0 + (this.usage.tasks.executing > 0 || this.tasksQueue.size > 0) ) { this.onEmptyQueueCount = 0 return -- 2.34.1