Re:Data Race Patterns in Go
by yencabulator on Sunday June 12, 2022 @11:36AM
(#31715293)
That's pretty easy to workaround:
type shapeContainer struct { Shape }
The usual way to use atomic.Value is by writing strongly-typed wrappers anyway, so that doesn't affect your codebase beyond about 3 lines.
It just had nothing to do with atomicity; it means something specific, not just “I like the failure mode.”