X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=src%2Fpools%2Fabstract-pool.ts;h=712de0b7da4c38c2808e1be61da7fced8e372da0;hb=884743b122a66be45c94d83d9230e28a9ab43836;hp=51a0dd943dfe56d7bb4baefa32fa0b803a217b8b;hpb=ed20267eeb81ac0fb4a3abb5d1bde586080c2671;p=poolifier.git diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 51a0dd94..712de0b7 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -588,8 +588,8 @@ export abstract class AbstractPool< } /** - * The pool readiness boolean status. - * @returns The pool readiness status. + * Whether the pool is ready or not. + * @returns The pool readiness boolean status. */ private get ready (): boolean { if (this.empty) { @@ -607,8 +607,8 @@ export abstract class AbstractPool< } /** - * The pool emptiness boolean status. - * @returns The pool emptiness status. + * Whether the pool is empty or not. + * @returns The pool emptiness boolean status. */ protected get empty (): boolean { return this.minimumNumberOfWorkers === 0 && this.workerNodes.length === 0 @@ -822,7 +822,7 @@ export abstract class AbstractPool< /** * Whether the pool is full or not. - * @returns The pool filling boolean status. + * @returns The pool fullness boolean status. */ protected get full (): boolean { return ( @@ -833,8 +833,7 @@ export abstract class AbstractPool< /** * Whether the pool is busy or not. - * - * The pool busyness boolean status. + * @returns The pool busyness boolean status. */ protected abstract get busy (): boolean @@ -1253,6 +1252,9 @@ export abstract class AbstractPool< * @param initWorkerNodeUsage - Whether to initialize the worker node usage or not. @defaultValue false */ private startMinimumNumberOfWorkers (initWorkerNodeUsage = false): void { + if (this.minimumNumberOfWorkers === 0) { + return + } this.startingMinimumNumberOfWorkers = true while ( this.workerNodes.reduce(