Skip to content

Function: attachProcessLock()

attachProcessLock(worker): void

Wire an ALREADY-RUNNING worker into the lock, for a worker this code did not construct (a pool from a library, say).

Prefer processLockWorkerOptions: the port arrives with a message, so the worker cannot lock during module initialization and must await processLockAttached first. The worker side needs no other change - withProcessLock works normally once the port lands.

Worker

void