Interface: FileLockLease
Defined in: file-lock-lease.ts:7
Active lease returned by acquireFileLock representing exclusive ownership of a lockfile path.
Callers must invoke release() inside a try / finally block (or prefer withFileLock) to stop the background utimes heartbeat, remove the lockfile from disk, and advance the in-process PQueue.
Methods
release()
ts
release(): Promise<void>;Defined in: file-lock-lease.ts:21
Cancels the periodic utimes heartbeat, awaits any in-flight heartbeat write, and unlinks the lockfile.
Safe to invoke multiple times; subsequent calls after the first release resolve as a no-op without disturbing later lock holders.
Returns
Promise<void>
Resolves once the heartbeat is stopped, the lockfile is removed, and the queue slot is freed.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
lockPath | readonly | string | Canonical absolute filesystem path of the acquired lockfile. | file-lock-lease.ts:9 |
ownerToken | readonly | string | Unique token identifying this specific lease acquisition instance. | file-lock-lease.ts:11 |