export interface CrossProcessLockOptions { /** * A lock whose mtime has not moved for this long is treated as abandoned and * taken over. Default 30s. A live holder refreshes its mtime roughly every * `staleMs / 3`, so this bounds "how long after a holder dies (or its host * freezes) the store stays locked", NOT how long an operation may run. */ readonly staleMs?: number | undefined; /** Initial retry backoff when the lock is held by someone else (and not stale). Default 25ms. */ readonly initialBackoffMs?: number | undefined; /** Backoff cap; doubles each retry up to this ceiling. Default 500ms. */ readonly maxBackoffMs?: number | undefined; /** Give up and throw after waiting this long in total. Default 15s. */ readonly totalTimeoutMs?: number | undefined; } /** * Acquire the cross-process lock at `lockPath`, retrying with capped * exponential backoff while it is held (and not stale) by another process. * Same-process acquisitions of one path queue in order rather than contending * (see `inProcessTails`). Returns a release function; the caller MUST call it * (typically in a `finally`) even if the protected work throws. Release is * idempotent, and only ever deletes a lock file this call actually owns. * * Throws if the lock cannot be acquired within `totalTimeoutMs`, counted * from entry, spanning both the in-process queue wait and the file * acquisition, a wedged lock this function itself declines to take over * (still fresh, still owned by a live pid) must surface as an honest * failure, not a silent hang. */ export declare function acquireCrossProcessLock(lockPath: string, options?: CrossProcessLockOptions): Promise<() => void>; //# sourceMappingURL=cross-process-lock.d.ts.map