From 249900794cc90e66d180fb43e59937e89a50fb65 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 10 Apr 2023 06:07:04 +0200 Subject: [PATCH] perf: optimize fixed pool busyness detection MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/pools/abstract-pool.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 661eb7b6..1a1a89fb 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -214,10 +214,7 @@ export abstract class AbstractPool< public abstract get busy (): boolean protected internalBusy (): boolean { - return ( - this.numberOfRunningTasks >= this.numberOfWorkers && - this.findFreeWorkerNodeKey() === -1 - ) + return this.findFreeWorkerNodeKey() === -1 } /** @inheritDoc */ -- 2.34.1