X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fthread%2Fdynamic.ts;h=8e795512694aa41a2ea82b9c727e3ebd348b01c9;hb=76ae94ffbe0d293daee778f0e885866242059450;hp=2fc360817d2b7bab3e634365b03ca9b541c76715;hpb=d35e571704515a8b729d3455e4784054f07c368f;p=poolifier.git diff --git a/src/pools/thread/dynamic.ts b/src/pools/thread/dynamic.ts index 2fc36081..8e795512 100644 --- a/src/pools/thread/dynamic.ts +++ b/src/pools/thread/dynamic.ts @@ -34,13 +34,13 @@ export class DynamicThreadPool< 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 */