antonau.tech
Home
Posts
About
Search
Home
Posts
About
Search
Mutex
2025
Tricky parts of Golang. The Mutex Copy Trap
Mar 5
You copy a struct to pass it to a helper function. The mutex inside is now two independent locks protecting the same data. Your race detector says nothing. Your tests pass. Production disagrees — intermittently, and badly.