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, re-exports parking_lot types.

Modulesยง

async_impl ๐Ÿ”’
Wrappers around tokio::sync lock types, where necessary.

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.
OwnedRwLockReadGuard ๐Ÿ”’
Owned RAII structure used to release the shared read access of a lock when dropped.
OwnedRwLockWriteGuard ๐Ÿ”’
Owned RAII structure used to release the exclusive write access of a lock when dropped.
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.

Enumsยง

RwLockEitherGuard ๐Ÿ”’
Either an owned read guard or a borrowed write guard on an OwnedRwLock.