News for hackers. Stuff that matters.
Re:Singleton Pattern in Go by millstone on Sunday July 12, 2015 @03:38PM (#9874620)
Yes, this is broken on certain architectures like PPC. Another core may see the "check" bool as set, but the fields of the protected object as uninitialized. One way to address this is to insert a write barrier just before setting the check bool, and a read barrier just after reading it.

There are no comments on this comment yet.