The plight of the misunderstood memory ordering

170 points termhn 33 comments

I've long held some misconceptions about memory orderings which I now see commonly in others' code and discussions about atomics. I also think most resources regarding memory ordering don't emphasize exactly what their core purpose is enough, which ends up leading to these misconceptions. So, I wrote a blog post about it.