build(deps-dev): apply updates
[poolifier.git] / src / pools / cluster / dynamic.ts
index 311d5c9d9393157205d03e5029f5515d7ba9a46b..e8e51947246602194951bb4366c68c9cf9d63ad4 100644 (file)
@@ -34,13 +34,13 @@ export class DynamicClusterPool<
     super(min, filePath, opts, max)
     checkDynamicPoolSize(
       this.minimumNumberOfWorkers,
-      this.maximumNumberOfWorkers as number
+      this.maximumNumberOfWorkers
     )
   }
 
   /** @inheritDoc */
   protected shallCreateDynamicWorker (): boolean {
-    return !this.full && this.internalBusy()
+    return (!this.full && this.internalBusy()) || this.empty
   }
 
   /** @inheritDoc */