X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fthread%2Fdynamic.ts;h=05b61684173af58c7ed7dbbc52218c874a35fa7a;hb=243a550a93e278669fe5602aeba92dc8ba11260e;hp=33e42892c424a671caf547148aa4deacaf83f5f8;hpb=9cd39dd47830f0923cd3ebf53b709bf7fb07e788;p=poolifier.git diff --git a/src/pools/thread/dynamic.ts b/src/pools/thread/dynamic.ts index 33e42892..05b61684 100644 --- a/src/pools/thread/dynamic.ts +++ b/src/pools/thread/dynamic.ts @@ -28,25 +28,25 @@ export class DynamicThreadPool< */ public constructor ( min: number, - private readonly max: number, + public readonly max: number, filePath: string, opts: PoolOptions = {} ) { super(min, filePath, opts) } - /** {@inheritDoc} */ + /** @inheritDoc */ public get type (): PoolType { return PoolType.DYNAMIC } - /** {@inheritDoc} */ + /** @inheritDoc */ public get full (): boolean { - return this.workers.length === this.max + return this.workerNodes.length === this.max } - /** {@inheritDoc} */ + /** @inheritDoc */ public get busy (): boolean { - return this.full && this.findFreeWorkerKey() === -1 + return this.full && this.internalBusy() } }