On Wed, Nov 30, 2016 at 5:44 PM, Daniel Fanjul <daniel.fanjul.alcu...@gmail.com> wrote: > I cannot tell if there is any memory barrier in the code of > sync.RWMutex.Lock(), I don't understand it completely. I just think there is > not. > https://golang.org/src/sync/mutex.go?s=1143:1165#L34
The sync/atomic routines provides memory barriers. I agree that this fact is not documented, but it is true nonetheless. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.