-
- // All workers are busy, create a new worker
- return this.createWorkerCallback()
+ const freeWorkerKey = this.pool.findFreeWorkerKey()
+ if (freeWorkerKey === -1) {
+ return this.createWorkerCallback()
+ }
+ return this.workerChoiceStrategy.choose()