From: Jérôme Benoit Date: Tue, 11 Apr 2023 06:19:05 +0000 (+0200) Subject: perf: remove unneeded decrement in condition X-Git-Tag: v2.4.7~14 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=3528c992d348d18ae41e803ac202e1e15ec31589;p=poolifier.git perf: remove unneeded decrement in condition Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 99f65a24..3f6e7034 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -258,10 +258,9 @@ export abstract class AbstractPool< if ( this.opts.enableTasksQueue === true && (this.busy || - this.workerNodes[workerNodeKey].tasksUsage.running > + this.workerNodes[workerNodeKey].tasksUsage.running >= ((this.opts.tasksQueueOptions as TasksQueueOptions) - .concurrency as number) - - 1) + .concurrency as number)) ) { this.enqueueTask(workerNodeKey, submittedTask) } else {