FIFO mutex for one VCS root.
Repository root (named in warnings).
Logger for long-wait and long-hold warnings.
The operation holding the lock, if any.
Run work while holding the lock. Callers queue in arrival order; the lock is released when work settles, whatever its outcome.
work
Operation name, for warnings and heldBy.
The work to run under the lock (must not take it again).
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.
waitMs
Longest wait for the lock.
LockWaitTimeoutError when the wait runs out.
FIFO mutex for one VCS root.