import { cpus } from 'node:os'
import type { IWorker } from '../worker'
+import type { IPool } from '../pool'
+import { DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS } from '../../utils'
import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy'
import type {
IWorkerChoiceStrategy,
RequiredStatistics,
WorkerChoiceStrategyOptions
} from './selection-strategies-types'
-import type { IPool } from '../pool'
-import { DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS } from '../../utils'
/**
* Virtual task runtime.
opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
) {
super(pool, opts)
- this.checkOptions(opts)
+ this.checkOptions(this.opts)
this.defaultWorkerWeight = this.computeWorkerWeight()
this.initWorkersTaskRunTime()
}