X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fcluster%2Fdynamic.ts;h=e8e51947246602194951bb4366c68c9cf9d63ad4;hb=8f081cca7093fee8a6e565c4b05d10fa30565cd1;hp=311d5c9d9393157205d03e5029f5515d7ba9a46b;hpb=d35e571704515a8b729d3455e4784054f07c368f;p=poolifier.git diff --git a/src/pools/cluster/dynamic.ts b/src/pools/cluster/dynamic.ts index 311d5c9d..e8e51947 100644 --- a/src/pools/cluster/dynamic.ts +++ b/src/pools/cluster/dynamic.ts @@ -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 */