X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fcluster%2Fdynamic.ts;h=eb2b996571f665ff14154cf338c387c5dfa28266;hb=09a6305fb250c17cb2565f8cbe3d9afbb33f307c;hp=78c63aca64d8da1e879c723bd0fd064f46de83ee;hpb=c319c66bad0611acf6087950a1f8a20f8124167b;p=poolifier.git diff --git a/src/pools/cluster/dynamic.ts b/src/pools/cluster/dynamic.ts index 78c63aca..eb2b9965 100644 --- a/src/pools/cluster/dynamic.ts +++ b/src/pools/cluster/dynamic.ts @@ -9,7 +9,7 @@ import { FixedClusterPool } from './fixed' * When the maximum number of workers is reached and workers are busy, an event is emitted. If you want to listen to this event, use the pool's `emitter`. * * @typeParam Data - Type of data sent to the worker. This can only be serializable data. - * @typeParam Response - Type of response of execution. This can only be serializable data. + * @typeParam Response - Type of execution response. This can only be serializable data. * @author [Christopher Quadflieg](https://github.com/Shinigami92) * @since 2.0.0 */ @@ -39,6 +39,11 @@ export class DynamicClusterPool< return PoolType.DYNAMIC } + /** @inheritDoc */ + public get size (): number { + return this.max + } + /** @inheritDoc */ protected get full (): boolean { return this.workerNodes.length === this.max