Available on crate feature
sync
only.Expand description
Future-aware synchronization
This module is enabled with the sync
feature flag.
Tasks sometimes need to communicate with each other. This module contains basic abstractions for doing so:
Modules§
- A multi-producer, multi-consumer broadcast queue. Each sent value is seen by all consumers.
- A multi-producer, single-consumer queue for sending values across asynchronous tasks.
- A channel for sending a single message between asynchronous tasks.
- A single-producer, multi-consumer channel that only retains the last sent value.
Structs§
- A barrier enables multiple threads to synchronize the beginning of some computation.
- A
BarrierWaitResult
is returned bywait
when all threads in theBarrier
have rendezvoused. - An asynchronous mutual exclusion primitive useful for protecting shared data
- A handle to a held
Mutex
. - An asynchronous reader-writer lock
- RAII structure used to release the shared read access of a lock when dropped.
- RAII structure used to release the exclusive write access of a lock when dropped.
- Counting semaphore performing asynchronous permit aquisition.
- A permit from the semaphore