How long a contender waits is a property of the operation the lock holder runs, not of the write protocol. The 2s default was sized for the render-and-rename cycle every call site had; a credential mutation that refreshes an expired token performs a network round trip while holding the lock, and leaving the default in place would fail every other writer of that file for the duration. `withFileLock` takes an optional `waitMs`; the retry cadence stays fixed because it governs how often a contender asks, which no caller varies. Every existing call site keeps the default. |
||
|---|---|---|
| .. | ||
| index.ts | ||
| invariant.ts | ||