Is it possible for lost writes to occur when using Ordering::Relaxed with compare_and_swap with Rust's atomics? The docs suggest not: "if you take all the operations affecting a specific address, a consistent ordering exists", but I can't find a formal semantics.
-
-
Replying to @MarcJBrooker
No, I don’t believe so. On Intel x86, rustc ought upgrade the Relaxed to Acquire, but perhaps
@stjepang might be able to comment otherwise.1 reply 0 retweets 1 like
Agree. Every memory address has its own consistent "timeline". Orderings only talk about how the CPU core should time-travel through multiple addresses simultaneously. E.g. a relaxed operation will not time-travel through any addresses other than the one touched by the operation.
0 replies
1 retweet
3 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.