[−][src]Module tokio::sync
This is supported on
feature="sync"
only.Future-aware synchronization
This module is enabled with the sync
feature flag.
Tasks sometimes need to communicate with each other. This module contains two basic abstractions for doing so:
Modules
mpsc | feature="sync" and feature="sync" A multi-producer, single-consumer queue for sending values across asynchronous tasks. |
oneshot | feature="sync" and feature="sync" A channel for sending a single message between asynchronous tasks. |
watch | feature="sync" and feature="sync" A single-producer, multi-consumer channel that only retains the last sent value. |
Structs
Barrier | feature="sync" A barrier enables multiple threads to synchronize the beginning of some computation. |
BarrierWaitResult | feature="sync" A |
Mutex | feature="sync" An asynchronous mutual exclusion primitive useful for protecting shared data |
MutexGuard | feature="sync" A handle to a held |