jeeves-watcher
    Preparing search index...

    FIFO mutex for one VCS root.

    Index
    • Run work while holding the lock. Callers queue in arrival order; the lock is released when work settles, whatever its outcome.

      Type Parameters

      • T

      Parameters

      • operation: string

        Operation name, for warnings and heldBy.

      • work: () => Promise<T>

        The work to run under the lock (must not take it again).

      Returns Promise<T>

      What work returns.

    • run, giving up when the lock is not acquired within waitMs (D102). A caller that gives up never runs work; its place in the queue passes straight on, so later callers keep their order.

      Type Parameters

      • T

      Parameters

      • operation: string

        Operation name, for warnings and heldBy.

      • waitMs: number

        Longest wait for the lock.

      • work: () => Promise<T>

        The work to run under the lock (must not take it again).

      Returns Promise<T>

      What work returns.

      LockWaitTimeoutError when the wait runs out.