Module sync

Source
Expand description

Synchronization primitives.

Extends: std::{sync}


Structs§

Arcalloc
⚛️ ?alloc A thread-safe reference-counting pointer.
ArcWeakalloc
⚛️ ?alloc A version of Arc that holds a non-owning reference.
Atomicdep_atomic
⚛️ atomic A generic atomic wrapper type.
AtomicBool
⚛️ ?core A boolean type which can be safely shared between threads.
AtomicF32dep_portable_atomic
⚛️ portable-atomic A thread-safe floating-point type.
AtomicF64dep_portable_atomic
⚛️ portable-atomic A thread-safe floating-point type.
AtomicI8
⚛️ ?core A thread-safe signed integer type.
AtomicI16
⚛️ ?core A thread-safe signed integer type.
AtomicI32
⚛️ ?core A thread-safe signed integer type.
AtomicI64
⚛️ ?core A thread-safe signed integer type.
AtomicI128dep_portable_atomic
⚛️ portable-atomic A thread-safe signed integer type.
AtomicIsize
⚛️ ?core A thread-safe signed integer type.
AtomicPtr
⚛️ ?core A raw pointer type which can be safely shared between threads.
AtomicU8
⚛️ ?core A thread-safe unsigned integer type.
AtomicU16
⚛️ ?core A thread-safe unsigned integer type.
AtomicU32
⚛️ ?core A thread-safe unsigned integer type.
AtomicU64
⚛️ ?core A thread-safe unsigned integer type.
AtomicU128dep_portable_atomic
⚛️ portable-atomic A thread-safe unsigned integer type.
AtomicUsize
⚛️ ?core A thread-safe unsigned integer type.
Barrierstd
std Enables multiple threads to synchronize the beginning of some computation.
BarrierWaitResultstd
⚖️ std Returned by Barrier::wait() when all threads in the Barrier have rendezvoused.
Condvarstd
std A Condition Variable
LazyLockstd
std A value which is initialized on the first access.
Mutexstd
std A mutual exclusion primitive useful for protecting shared data.
MutexGuardstd
std An RAII implementation of a “scoped lock” of a mutex.
Oncestd
std A synchronization primitive for one-time global initialization.
OnceLockstd
std A synchronization primitive which can be written to only once.
OnceStatestd
std State yielded to Once::call_once_force()’s closure parameter.
PoisonErrorstd
🚩 std A type of error which can be returned whenever a lock is acquired.
RwLockstd
std A reader-writer lock
RwLockReadGuardstd
std RAII structure used to release the shared read access of a lock when dropped.
RwLockWriteGuardstd
std RAII structure used to release the exclusive write access of a lock when dropped.
WaitTimeoutResultstd
⚖️ std Whether a timed wait on a condition variable returned due to a time out or not.

Enums§

AtomicOrdering
⚛️ core Atomic memory ordering.
TryLockErrorstd
🚩+ std An enumeration of possible errors associated with a TryLockResult.

Functions§

atomic_compiler_fence
⚛️ core A compiler memory fence.
atomic_fence
⚛️ core An atomic fence.

Type Aliases§

LockResultstd
⚖️ std A type alias for the result of a lock method which can be poisoned.
TryLockResultstd
⚖️ std A type alias for the result of a nonblocking locking method.