Function crossbeam_utils::atomic::atomic_cell::atomic_swap
source ยท unsafe fn atomic_swap<T>(dst: *mut T, val: T) -> T
Expand description
Atomically swaps data at dst
with val
.
This operation uses the AcqRel
ordering. If possible, an atomic instructions is used, and a
global lock otherwise.