Acquires the lock, waiting if necessary until it is available.
Optionalsignal: AbortSignal | nullAn optional AbortSignal to cancel the acquire operation.
A promise that resolves when the lock is acquired.
Attempts to acquire the lock without waiting.
True if the lock was successfully acquired, false otherwise.
Releases the lock.
Interface representing a lockable resource.
A lockable resource can be acquired and released to control access.