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