Skip to content

@paraharness/lockfile ​

Functions ​

FunctionDescription
acquireFileLockAcquires an exclusive in-process (PQueue) and cross-process (open(..., 'wx') + heartbeat) lock on lockPath.
withFileLockExecutes an asynchronous work callback while holding an exclusive file lock on lockPath.

Interfaces ​

InterfaceDescription
FileLockLeaseActive lease returned by acquireFileLock representing exclusive ownership of a lockfile path.
FileLockOptionsConfiguration options controlling cross-process file lock acquisition, heartbeat cadence, and stale lock recovery.

Released under the MIT License.