-import type { ClusterSettings, Worker } from 'cluster'
-import cluster from 'cluster'
+import type { ClusterSettings, Worker } from 'node:cluster'
+import cluster from 'node:cluster'
import type { MessageValue } from '../../utility-types'
-import { EMPTY_OBJECT_LITERAL } from '../../utils'
import { AbstractPool } from '../abstract-pool'
import type { PoolOptions } from '../pool'
import { PoolType } from '../pool-internal'
public constructor (
numberOfWorkers: number,
filePath: string,
- public readonly opts: ClusterPoolOptions = EMPTY_OBJECT_LITERAL
+ public readonly opts: ClusterPoolOptions = {}
) {
super(numberOfWorkers, filePath, opts)
}
return PoolType.FIXED
}
+ /** {@inheritDoc} */
+ public get full (): boolean {
+ return this.workers.length === this.numberOfWorkers
+ }
+
/** {@inheritDoc} */
public get busy (): boolean {
- return this.internalGetBusyStatus()
+ return this.internalBusy()
}
}