Expand description
A wrapper around the core::sync::atomic.
§Atomic types
Atomic types provide primitive shared-memory communication between threads, and are the building blocks of other concurrent types.
This module defines a wrapper to the atomic types defined in
core::sync::atomic, including AtomicBool, AtomicIsize,
AtomicUsize, AtomicI8, AtomicU16, etc.
Atomic types present operations that, when used correctly, synchronize
updates between threads.
Atomic variables are safe to share between threads (they implement Sync)
but they do not themselves provide the mechanism for sharing and follow the
threading model of
Rust. The most common way to share an atomic variable is to put it into an
Arc (an atomically-reference-counted shared pointer).
Macros§
- atomic_
int 🔒 - if_
8_ 🔒bit
Structs§
- Atomic
Bool - A boolean type which can be safely shared between threads.
- Atomic
I8 - An integer type which can be safely shared between threads.
- Atomic
I16 - An integer type which can be safely shared between threads.
- Atomic
I32 - An integer type which can be safely shared between threads.
- Atomic
I64 - An integer type which can be safely shared between threads.
- Atomic
Isize - An integer type which can be safely shared between threads.
- Atomic
Ptr - A raw pointer type which can be safely shared between threads.
- Atomic
U8 - An integer type which can be safely shared between threads.
- Atomic
U16 - An integer type which can be safely shared between threads.
- Atomic
U32 - An integer type which can be safely shared between threads.
- Atomic
U64 - An integer type which can be safely shared between threads.
- Atomic
Usize - An integer type which can be safely shared between threads.