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'
+import { type PoolOptions, type PoolType, PoolTypes } from '../pool'
/**
* Options for a poolifier cluster pool.
/** @inheritDoc */
public get type (): PoolType {
- return PoolType.FIXED
+ return PoolTypes.fixed
+ }
+
+ /** @inheritDoc */
+ protected get minSize (): number {
+ return this.numberOfWorkers
+ }
+
+ /** @inheritDoc */
+ protected get maxSize (): number {
+ return this.numberOfWorkers
}
/** @inheritDoc */
protected get full (): boolean {
- return this.workerNodes.length === this.numberOfWorkers
+ return this.workerNodes.length >= this.numberOfWorkers
}
/** @inheritDoc */