Skip to main content

Module sync

Module sync 

Source
Expand description

Synchronizing primitives

Some of the no_std structures located in this module were copied from the https://github.com/crossbeam-rs/crossbeam project and modified to fit into wtx. On the other hand, some structures are just wrappers or facades of third-parties.

Structs§

Arc
A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.
AsyncMutex
An asynchronous Mutex-like type.
AsyncMutexGuard
An RAII guard returned by the lock and try_lock methods. When this structure is dropped (falls out of scope), the lock will be unlocked.
AsyncMutexGuardFuture
A future which resolves when the target mutex has been successfully acquired.
AtomicBool
An integer type which can be safely shared between threads.
AtomicCell
A type that allows copyable elements to be safely shared between threads.
AtomicU32
An integer type which can be safely shared between threads.
AtomicU64
An integer type which can be safely shared between threads.
AtomicUsize
An integer type which can be safely shared between threads.
AtomicWaker
Waker that can be shared across tasks.
Backoff
Performs exponential backoff in spin loops, which reduces contention that may improve overall performance.
CachePadded
Prevents false sharing by padding and aligning to the length of a cache line.
CrossbeamMpmccrossbeam-channel
Uses the channel provided by the Crossbeam project.
StdMpmcstd and nightly
Uses the channel provided by the standard library.
SyncMutex
A mutual exclusion primitive useful for protecting shared data.
SyncMutexGuard
A RAII implementation of a “scoped lock” of a mutex.

Traits§

Mpmc
Multi-producer multi-consumer channel.
Receiver
The receiving side of a channel.
RefCounter
Reference Counter
Sender
The sending side of a channel.

Functions§

fence
An atomic fence.