perf: add dynamic thread pool to continuous benchmark
[poolifier.git] / src / pools / abstract-pool.ts
index d3540098d4ca192ed0e93b6a491358435572c743..9aa6ec3dfeab90f8ba462920290f8a7b74b91f80 100644 (file)
@@ -699,14 +699,13 @@ export abstract class AbstractPool<
               (this.opts.tasksQueueOptions?.concurrency as number)
         ) === -1
       )
-    } else {
-      return (
-        this.workerNodes.findIndex(
-          workerNode =>
-            workerNode.info.ready && workerNode.usage.tasks.executing === 0
-        ) === -1
-      )
     }
+    return (
+      this.workerNodes.findIndex(
+        workerNode =>
+          workerNode.info.ready && workerNode.usage.tasks.executing === 0
+      ) === -1
+    )
   }
 
   /** @inheritDoc */