API reference@evolu/commonLockManager › acquireLeaderLock

function acquireLeaderLock(
  name: string,
): Task<AsyncDisposable, never, LockManagerDep>;

Defined in: packages/common/src/LockManager.ts:124

Competes to become the current leader for name using LockManager.

Only one caller can lead for a given name at a time, and the returned AsyncDisposable represents that leadership.

Leadership is held until the returned handle is disposed. Once released, another waiting caller may become the next leader. Waiting for leadership is abortable via the calling Task's signal.