Skip to content

Interface: FileLockOptions ​

Defined in: file-lock-options.ts:7

Configuration options controlling cross-process file lock acquisition, heartbeat cadence, and stale lock recovery.

All timing parameters default to conservative production values when omitted, allowing fast deterministic overrides in unit tests without wall-clock delays.

Properties ​

PropertyModifierTypeDescriptionDefined in
heartbeatIntervalMs?readonlynumberInterval in milliseconds at which the holder updates the lockfile mtime while holding the lease.file-lock-options.ts:13
retryDelayMs?readonlynumberPolling delay in milliseconds between cross-process EEXIST retry attempts.file-lock-options.ts:15
signal?readonlyAbortSignalOptional abort signal cancelling queued lock acquisition before entering the critical section.file-lock-options.ts:17
staleMs?readonlynumberMaximum milliseconds since last mtime heartbeat before an active PID's lockfile is considered stale.file-lock-options.ts:11
timeoutMs?readonlynumberMaximum milliseconds to wait for lock acquisition before throwing a timeout error.file-lock-options.ts:9

Released under the MIT License.