Module maitake_sync::semaphore
source · Expand description
An asynchronous counting semaphore.
A semaphore limits the number of tasks which may execute concurrently. See
the Semaphore
type’s documentation for details.
Structs
- The future returned by the
Semaphore::acquire
method. - AcquireOwned
alloc
Future returned fromSemaphore::acquire_owned()
. - OwnedPermit
alloc
An owned RAII guard representing one or more permits acquired from aSemaphore
. - A RAII guard representing one or more permits acquired from a
Semaphore
. - An asynchronous counting semaphore.
Enums
- Errors returned by
Semaphore::try_acquire
.