Skip to main content

Module thread_primitives

Module thread_primitives 

Source
Expand description

This module provides all the primitives needed to build a multithreaded application.

Modules§

io
Traits, helpers, and type definitions for asynchronous I/O functionality.

Structs§

AsyncMutex
An asynchronous Mutex-like type.
AsyncMutexGuard
A handle to a held Mutex. The guard can be held across any .await point as it is Send.
AsyncRwLock
An asynchronous reader-writer lock.
AsyncRwLockReadGuard
RAII structure used to release the shared read access of a lock when dropped.
AsyncRwLockWriteGuard
RAII structure used to release the exclusive write access of a lock when dropped.
SyncMutex
A mutual exclusion primitive useful for protecting shared data
SyncMutexGuard
An RAII implementation of a “scoped lock” of a mutex. When this structure is dropped (falls out of scope), the lock will be unlocked.
SyncRwLock
A reader-writer lock

Traits§

AsyncReadExt
Reads bytes from a source.
AsyncWriteExt
Writes bytes to a sink.

Functions§

init_runtime

Type Aliases§

RuntimeGuard
SafeTokioRuntime