]> Cypherpunks repositories - gostls13.git/commit
sync: add sync.Once, a proposed replacement for package once.
authorRob Pike <r@golang.org>
Thu, 5 Aug 2010 03:31:10 +0000 (13:31 +1000)
committerRob Pike <r@golang.org>
Thu, 5 Aug 2010 03:31:10 +0000 (13:31 +1000)
commit895c5db6df786e9312d187f27d6a4538afd4b0b1
tree483a32ad34ddd1972c77703862a5156c118e63a9
parent9265bc24849945e862a60100c9754b99425663b3
sync: add sync.Once, a proposed replacement for package once.
This implementation is simpler and more useful, since it can work
with methods.

R=rsc
CC=golang-dev
https://golang.org/cl/1864051
src/pkg/sync/Makefile
src/pkg/sync/mutex.go
src/pkg/sync/once.go [new file with mode: 0644]
src/pkg/sync/once_test.go [new file with mode: 0644]