perf: bind to this some methods in the tasks execution code path
[poolifier.git] / src / pools / selection-strategies / abstract-worker-choice-strategy.ts
index 5c2a553d187b92fe5793fac750a7ae2c5d0d9e82..3a5d6e04a3ddd46e0e78e8d8a57062e8e9ba966c 100644 (file)
@@ -35,6 +35,7 @@ export abstract class AbstractWorkerChoiceStrategy<
     protected readonly pool: IPoolInternal<Worker, Data, Response>
   ) {
     this.isDynamicPool = this.pool.type === PoolType.DYNAMIC
+    this.choose.bind(this)
   }
 
   /** {@inheritDoc} */