News for hackers. Stuff that matters.
Re:Rust: A Unique Perspective by shinazueli on Friday February 10, 2023 @06:08AM (#34738173)
It has Atomics that use the same memory constraint model (Relaxed, SeqCst, etc), if that’s what you meant.

You can indeed create data races with them, but only in combination with unsafe code.

https://doc.rust-lang.org/nomicon/races.html

Re:Rust: A Unique Perspective by anonymousDan on Friday February 10, 2023 @06:15AM (#34738219)
I meant inserting barriers (read fence/write fence etc) explicitly. Thanks for the link, very interesting.
Re:Rust: A Unique Perspective by jamesmunns on Friday February 10, 2023 @07:34AM (#34738839)
Yep, we have `fence` for runtime+compile time barriers, and `compiler_fence` for compile time barriers. They take the same Ordering enum as atomics.