From: Jérôme Benoit Date: Sat, 6 Jan 2024 09:24:52 +0000 (+0100) Subject: perf: optimize pool emptiness condition X-Git-Tag: v3.1.18~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=fb43035cdeaef2c68f9d3c9f8a31071fd6b71e05;p=poolifier.git perf: optimize pool emptiness condition Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index ab114e1a..2b834158 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -461,10 +461,7 @@ export abstract class AbstractPool< * The pool emptiness boolean status. */ protected get empty (): boolean { - if (this.minimumNumberOfWorkers === 0 && this.workerNodes.length === 0) { - return true - } - return false + return this.minimumNumberOfWorkers === 0 && this.workerNodes.length === 0 } /**