mirror of
https://github.com/golang/go
synced 2024-11-19 02:14:43 -07:00
bc593eac2d
It's not correct to use atomic.CompareAndSwap to implement Once.Do, and we don't, but why we don't is a question that has come up twice on golang-dev in the past few months. Add a comment to help others with the same question. Change-Id: Ia89ec9715cc5442c6e7f13e57a49c6cfe664d32c Reviewed-on: https://go-review.googlesource.com/c/go/+/184261 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Ingo Oeser <nightlyone@googlemail.com> |
||
---|---|---|
.. | ||
atomic | ||
cond_test.go | ||
cond.go | ||
example_pool_test.go | ||
example_test.go | ||
export_test.go | ||
map_bench_test.go | ||
map_reference_test.go | ||
map_test.go | ||
map.go | ||
mutex_test.go | ||
mutex.go | ||
once_test.go | ||
once.go | ||
pool_test.go | ||
pool.go | ||
poolqueue.go | ||
runtime_sema_test.go | ||
runtime.go | ||
rwmutex_test.go | ||
rwmutex.go | ||
waitgroup_test.go | ||
waitgroup.go |