]> Cypherpunks repositories - gostls13.git/commit
sync: use atomic.Store in Once.Do
authorDmitriy Vyukov <dvyukov@google.com>
Mon, 14 May 2012 15:27:29 +0000 (19:27 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Mon, 14 May 2012 15:27:29 +0000 (19:27 +0400)
commit8c4c6c413facabf44b3ecd1fc44bd887fc710271
tree9f0b2ea4f344f60c1d15841c30eb9ab21568c5fd
parent58bcec62c0f375f10e3bb32efc402e9c245c734b
sync: use atomic.Store in Once.Do
No perf/semantic changes, merely improves code health.
There were several questions as to why Once.Do uses
atomic.CompareAndSwap to do a store.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/6208057
src/pkg/sync/once.go