6 ms·
You totally can in safe rust: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU64.html#method.store https://doc.rust-lang.org/std/sync/atomic/struct.Atom
by seoaeu 4y ago
You totally can in safe rust: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU64.html#method.store https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU64.h...
- njs12345 4y agoThe atomics themselves sure, but I guess often they'll be used as a barrier to protect an UnsafeCell or something, like in the implementation of Lazy<T>: https://docs.rs/lazy-init/0.5.0/src/lazy_init/lib.rs.html#85 https://docs.rs/lazy-init/0.5.0/src/lazy_init/lib.rs.html#85