*/
export abstract class AbstractWorkerChoiceStrategy<
Worker extends IPoolWorker,
- Data,
- Response
-> implements IWorkerChoiceStrategy {
+ Data = unknown,
+ Response = unknown
+> implements IWorkerChoiceStrategy<Worker, Data, Response> {
/** {@inheritDoc} */
public readonly isDynamicPool: boolean
/** {@inheritDoc} */
}
/**
- * Constructs a worker choice strategy attached to the pool.
+ * Constructs a worker choice strategy bound to the pool.
*
* @param pool - The pool instance.
*/
public constructor (
- protected readonly pool: IPoolInternal<Worker, Data, Response>
+ public readonly pool: IPoolInternal<Worker, Data, Response>
) {
this.isDynamicPool = this.pool.type === PoolType.DYNAMIC
this.choose.bind(this)