Re:Go's race detector has a mutex blind spot
by jason_oster on Thursday July 31, 2025 @10:11AM
(#44745848)
Small correction: The Arc is for sharing across threads, the Mutex is for mutation. But you are generally correct that they can be used independently.
Re:Go's race detector has a mutex blind spot
by ViewTrick1002 on Thursday July 31, 2025 @10:41AM
(#44746185)
Of course. But if you’re using a channel then it hides the inner constructs.
Comparing writing a web service in Go and rust you would likely also utilize Tokio which has a wide variety of well designed sync primitives.
The Arc is only needed when you truly need to mutably share data.
Rust like Go has the full suite of different channels and what other patterns to share data.