2 unstable releases
new 0.2.0 | Dec 23, 2024 |
---|---|
0.1.0 | Dec 23, 2024 |
#6 in #ext
9KB
168 lines
Atomic extensions
AtomicArc: A lightweight atomic pointer to Arc
.
Example
use std::sync::{atomic::Ordering, Arc},
use atomic_ext::AtomicArc;
let a = Arc::new(1);
let x = AtomicArc::new(a);
let b = x.load(Ordering::Acquire);
let c = x.swap(Some(Arc::new(2)), Ordering::AcqRel);