6 Why do we need the sync atomic package?

dave.cheney.net posted by kenny 2546 days ago  

If aligned memory writes are atomic, why do we need the sync/atomic package?


This is a post inspired by a question on the Go Forum. The question, paraphrased, was “If properly aligned writes are guaranteed to be atomic by the processor, why does the race detector complain?”
Register to comment or vote on this story