+ protected readonly pool: IPoolInternal<Worker, Data, Response>,
+ protected readonly opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
+ ) {
+ this.checkOptions(this.opts)
+ this.isDynamicPool = this.pool.type === PoolType.DYNAMIC
+ this.choose.bind(this)
+ }
+
+ private checkOptions (opts: WorkerChoiceStrategyOptions): void {
+ if (this.requiredStatistics.avgRunTime && opts.medRunTime === true) {
+ this.requiredStatistics.medRunTime = true
+ }
+ }