A lock returned by Semaphore.acquire. Call SemaphoreLock.release to free the slot and allow the next waiting operation to proceed.
Creates a new lock instance.
A callback invoked once when the lock is released.
Releases the lock and allows the next waiting operation to proceed. Subsequent calls are no-ops; the lock can only be released once.
A lock returned by Semaphore.acquire. Call SemaphoreLock.release to free the slot and allow the next waiting operation to proceed.