Skip to main content

Module sync_primitives

Module sync_primitives 

Source
Expand description

Feature-agnostic synchronization primitives

In async mode, re-exports tokio::sync types. In sync mode, provides std::sync wrappers with a matching API.

Structsยง

Mutex ๐Ÿ”’
An asynchronous Mutex-like type.
MutexGuard ๐Ÿ”’
A handle to a held Mutex. The guard can be held across any .await point as it is Send.
RwLock ๐Ÿ”’
An asynchronous reader-writer lock.
RwLockReadGuard ๐Ÿ”’
RAII structure used to release the shared read access of a lock when dropped.
RwLockWriteGuard ๐Ÿ”’
RAII structure used to release the exclusive write access of a lock when dropped.