@@ -66,17+66,17 @@ export abstract class AbstractWorker<
*
* @param type - The type of async event.
* @param isMain - Whether this is the main worker or not.
*
* @param type - The type of async event.
* @param isMain - Whether this is the main worker or not.
- * @param taskFunctions - Task function(s) processed by the worker when the pool's `execution` function is invoked. The first function is the default function.
* @param mainWorker - Reference to main worker.
* @param mainWorker - Reference to main worker.
+ * @param taskFunctions - Task function(s) processed by the worker when the pool's `execution` function is invoked. The first function is the default function.
* @param opts - Options for the worker.
*/
public constructor (
type: string,
protected readonly isMain: boolean,
* @param opts - Options for the worker.
*/
public constructor (
type: string,
protected readonly isMain: boolean,
+ private readonly mainWorker: MainWorker,
taskFunctions:
| WorkerFunction<Data, Response>
| TaskFunctions<Data, Response>,
taskFunctions:
| WorkerFunction<Data, Response>
| TaskFunctions<Data, Response>,
- protected readonly mainWorker: MainWorker,
protected readonly opts: WorkerOptions = {
/**
* The kill behavior option on this worker or its default value.
protected readonly opts: WorkerOptions = {
/**
* The kill behavior option on this worker or its default value.
@@ -93,7+93,7 @@ export abstract class AbstractWorker<