+import { checkDynamicPoolSize } from '../utils'
import { type PoolType, PoolTypes } from '../pool'
import { type ClusterPoolOptions, FixedClusterPool } from './fixed'
*/
public constructor (
min: number,
- protected readonly max: number,
+ max: number,
filePath: string,
opts: ClusterPoolOptions = {}
) {
- super(min, filePath, opts)
- this.checkDynamicPoolSize(this.numberOfWorkers, this.max)
+ super(min, filePath, opts, max)
+ checkDynamicPoolSize(
+ this.minimumNumberOfWorkers,
+ this.maximumNumberOfWorkers as number
+ )
+ }
+
+ /** @inheritDoc */
+ protected shallCreateDynamicWorker (): boolean {
+ return !this.full && this.internalBusy()
}
/** @inheritDoc */