-import { EMPTY_OBJECT_LITERAL } from '../../utils'
import { PoolType } from '../pool-internal'
import type { ClusterPoolOptions } from './fixed'
import { FixedClusterPool } from './fixed'
*/
public constructor (
min: number,
- protected readonly max: number,
+ private readonly max: number,
filePath: string,
- opts: ClusterPoolOptions = EMPTY_OBJECT_LITERAL
+ opts: ClusterPoolOptions = {}
) {
super(min, filePath, opts)
}
}
/** {@inheritDoc} */
- public get busy (): boolean {
+ public get full (): boolean {
return this.workers.length === this.max
}
+
+ /** {@inheritDoc} */
+ public get busy (): boolean {
+ return this.full && this.findFreeWorkerKey() === -1
+ }
}