Skip to content

Commit f527994

Browse files
callthingsoffgopherbot
authored andcommitted
sync: update comments for Once.done
Sync with CL 666895. Change-Id: I49c4a7f88d87cee9c30a858facd3cd8348efdf94 GitHub-Last-Rev: 88ac1c9 GitHub-Pull-Request: #76026 Reviewed-on: https://go-review.googlesource.com/c/go/+/714360 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Jorropo <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: David Chase <[email protected]> Reviewed-by: Jorropo <[email protected]>
1 parent 5dcaf9a commit f527994

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sync/once.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type Once struct {
5252
func (o *Once) Do(f func()) {
5353
// Note: Here is an incorrect implementation of Do:
5454
//
55-
// if o.done.CompareAndSwap(0, 1) {
55+
// if o.done.CompareAndSwap(false, true) {
5656
// f()
5757
// }
5858
//

0 commit comments

Comments
 (0)