3 ms·
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.
by bascule 12y ago
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_condition_safety https://en.wikipedia.org/wiki/Go_(programming_language)#Race...