Interface: FileLockOptions
Backend selection, wait policy, and lifecycle callbacks for a cross-process lock.
Properties
Section titled “Properties”backends?
Section titled “backends?”
optionalbackends?: readonlyFileLockBackend[]
Override the backend list. Defaults to the portable file protocol.
optionaldir?:string
Directory for lockfiles. Defaults to $TMPDIR/dbx-tools-locks.
onAcquire?
Section titled “onAcquire?”
optionalonAcquire?: (acquisition) =>void
Invoked once the backend for this call has been chosen.
Parameters
Section titled “Parameters”acquisition
Section titled “acquisition”Returns
Section titled “Returns”void
onWait?
Section titled “onWait?”
optionalonWait?: (acquisition) =>void
Invoked once when the selected lock is already held by another process.
Parameters
Section titled “Parameters”acquisition
Section titled “acquisition”Returns
Section titled “Returns”void
timeoutMs?
Section titled “timeoutMs?”
optionaltimeoutMs?:number
Stop waiting and throw after this many milliseconds. Omit to poll forever. This is the only wait-loop knob; stale reclaim timing is fixed.