We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5dcaf9a commit f527994Copy full SHA for f527994
src/sync/once.go
@@ -52,7 +52,7 @@ type Once struct {
52
func (o *Once) Do(f func()) {
53
// Note: Here is an incorrect implementation of Do:
54
//
55
- // if o.done.CompareAndSwap(0, 1) {
+ // if o.done.CompareAndSwap(false, true) {
56
// f()
57
// }
58
0 commit comments