X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fthread%2Fdynamic.ts;h=8e795512694aa41a2ea82b9c727e3ebd348b01c9;hb=76ae94ffbe0d293daee778f0e885866242059450;hp=fde371048c5755c77736c6a25545fe19aa90df8d;hpb=c63a35a04c190989be80f9218d97e0aca739475e;p=poolifier.git diff --git a/src/pools/thread/dynamic.ts b/src/pools/thread/dynamic.ts index fde37104..8e795512 100644 --- a/src/pools/thread/dynamic.ts +++ b/src/pools/thread/dynamic.ts @@ -40,10 +40,7 @@ export class DynamicThreadPool< /** @inheritDoc */ protected shallCreateDynamicWorker (): boolean { - return ( - (!this.full && this.internalBusy()) || - (this.minimumNumberOfWorkers === 0 && this.workerNodes.length === 0) - ) + return (!this.full && this.internalBusy()) || this.empty } /** @inheritDoc */