A new diagram-based explanation of Rust/C++20 atomic orderings
I recently spent quite a bit of time rewriting the Nomicon’s chapter on atomics to give it a more accurate and complete explanation based around the actual underlying graphs instead of hand-waving about reordering. It is currently sitting around as an unreviewed pull request, however since I think it’s a very useful way to understand atomics I’m also posting it here for more visibility — the rendered version can be read online.
Even if you already know atomics, I would highly recommmend reading this because it helps visualize the model much better — I can guarantee it is nothing like any of the other explanations you’ve ever read about them.
And of course, feedback about any part of it is very much welcomed; leave them as comments here or on the PR itself.