/**
* Setup hook that can be overridden by a Poolifier pool implementation
* to run code before workers are created in the abstract constructor.
+ * Can be overridden
*
* @virtual
*/
protected setupHook (): void {
- // Can be overridden
+ // Intentionally empty
}
/**
* Handler Id of the `aliveInterval` worker alive check.
*/
protected readonly aliveInterval?: NodeJS.Timeout
- /**
- * Options for the worker.
- */
- public readonly opts: WorkerOptions
/**
* Constructs a new poolifier worker.
*
protected readonly isMain: boolean,
fn: (data: Data) => Response,
protected mainWorker: MainWorker | undefined | null,
- opts: WorkerOptions = {
+ protected readonly opts: WorkerOptions = {
/**
* The kill behavior option on this Worker or its default value.
*/
}
) {
super(type)
- this.opts = opts
this.checkFunctionInput(fn)
this.checkWorkerOptions(this.opts)
if (!this.isMain) {