Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
Data = unknown,
Response = unknown
> extends AsyncResource {
Data = unknown,
Response = unknown
> extends AsyncResource {
+ /**
+ * Options for the worker.
+ */
+ public readonly opts: WorkerOptions
/**
* Timestamp of the last task processed by this worker.
*/
/**
* Timestamp of the last task processed by this worker.
*/
isMain: boolean,
fn: (data: Data) => Response,
protected mainWorker: MainWorker | undefined | null,
isMain: boolean,
fn: (data: Data) => Response,
protected mainWorker: MainWorker | undefined | null,
- public readonly opts: WorkerOptions = {
+ opts: WorkerOptions = {
/**
* The kill behavior option on this Worker or its default value.
*/
/**
* The kill behavior option on this Worker or its default value.
*/
this.checkFunctionInput(fn)
this.checkWorkerOptions(this.opts)
this.lastTaskTimestamp = Date.now()
this.checkFunctionInput(fn)
this.checkWorkerOptions(this.opts)
this.lastTaskTimestamp = Date.now()