[][src]Module tokio::sync

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

A multi-producer, single-consumer queue for sending values across asynchronous tasks.

oneshot

A channel for sending a single message between asynchronous tasks.

watch

A single-producer, multi-consumer channel that only retains the last sent value.

Structs

Barrier

A barrier enables multiple threads to synchronize the beginning of some computation.

BarrierWaitResult

A BarrierWaitResult is returned by wait when all threads in the Barrier have rendezvoused.

Mutex

An asynchronous mutual exclusion primitive useful for protecting shared data

MutexGuard

A handle to a held Mutex.