X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fcluster%2Ffixed.ts;h=faa68fc74ce96ece284bb953f53db02c47c154e9;hb=12ae3210477b0c54380db24470ff3b0e78926bd8;hp=78de7073b615fc10936091aca0cd203165efaac8;hpb=afc003b20097712625ffd053e256ef5336e27b6e;p=poolifier.git diff --git a/src/pools/cluster/fixed.ts b/src/pools/cluster/fixed.ts index 78de7073..faa68fc7 100644 --- a/src/pools/cluster/fixed.ts +++ b/src/pools/cluster/fixed.ts @@ -3,7 +3,7 @@ import cluster from 'node:cluster' import type { MessageValue } from '../../utility-types' import { AbstractPool } from '../abstract-pool' import type { PoolOptions } from '../pool' -import { PoolType } from '../pool-internal' +import { PoolType } from '../pool' /** * Options for a poolifier cluster pool. @@ -66,7 +66,7 @@ export class FixedClusterPool< } /** @inheritDoc */ - public destroyWorker (worker: Worker): void { + protected destroyWorker (worker: Worker): void { this.sendToWorker(worker, { kill: 1 }) worker.kill() } @@ -77,7 +77,7 @@ export class FixedClusterPool< } /** @inheritDoc */ - public registerWorkerMessageListener( + protected registerWorkerMessageListener( worker: Worker, listener: (message: MessageValue) => void ): void { @@ -101,12 +101,12 @@ export class FixedClusterPool< } /** @inheritDoc */ - public get full (): boolean { - return this.workers.length === this.numberOfWorkers + protected get full (): boolean { + return this.workerNodes.length === this.numberOfWorkers } /** @inheritDoc */ - public get busy (): boolean { + protected get busy (): boolean { return this.internalBusy() } }