Function: processLockWorkerOptions()
processLockWorkerOptions(
options?):WorkerOptions
Add the coordinator port to a Worker’s options so the worker can lock
immediately - during module initialization, before any message is handled.
Preserves the caller’s workerData and transferList; the port is
transferred, as MessagePort cannot be cloned.
Parameters
Section titled “Parameters”options?
Section titled “options?”WorkerOptions = {}
Returns
Section titled “Returns”WorkerOptions
Example
Section titled “Example”new Worker(url, processLockWorkerOptions({ workerData: { tenant } }));