Acquires the lock, waiting if necessary until it is available.
Optional
signal: null | AbortSignalAn optional AbortSignal to cancel the acquire operation.
A promise that resolves to a function that releases the lock.
Releases the lock.
Acquires the lock, executes the callback, and releases the lock.
The callback to execute while holding the lock.
Optional
signal: null | AbortSignalAn optional AbortSignal to cancel the acquire operation.
The result of the callback.
Interface representing a lockable resource.
A lockable resource can be acquired and released to ensure exclusive access.