AnyLock.onAcquire() method

Implements late lock acquire handler upset. The handler is called when the lock gets taken over by a retry, long after the acquire() caller has given up - which makes it the only chance for that caller to finish whatever the lock was being acquired for.

Signature:

onAcquire(handler: (channel: string) => void): void;

Parameters

Parameter

Type

Description

handler

(channel: string) => void

called with the channel name when a retry finally wins the lock, potentially long after acquire() resolved false

Returns:

void

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.