Hacker News new | ask | show | jobs
by jhawk28 4288 days ago
How does go not prevent data races? It has a race detector, channels, and atomics.
1 comments

You can still send mutable state across channels, at which point it is shared and potentially racy. Race detectors only help you catch data races in the act (e.g. in production), they don't prevent them from happening in the first place.

Wikipedia has a nice description:

https://en.wikipedia.org/wiki/Go_(programming_language)#Race...