From: Jérôme Benoit Date: Sat, 26 Aug 2023 14:29:57 +0000 (+0200) Subject: perf: stop continuous task stealing at task executing X-Git-Tag: v2.6.36~16 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=79b197bb222403411621c41775d9d640f4150633;p=poolifier.git perf: stop continuous task stealing at task executing Signed-off-by: Jérôme Benoit --- 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