Expand description
A simple asynchronous semaphore for limiting and sequencing access to arbitrary shared resources.
Structs§
- Acquire
- The
Futurereturned byacquire, which resolves when the required number of permits becomes available. - Acquire
Error - An error which can occur when a
Semaphorehas been closed. - Permit
- A permit representing access to the
Semaphore’s guarded resource. - Semaphore
- An unsynchronized (
!Sync), simple semaphore for asynchronous permit acquisition.
Enums§
- TryAcquire
Error - An error which can occur when a
Semaphorehas been closed or has no available permits.