sync: update comments for Once.done

Sync with CL 666895.

Change-Id: I49c4a7f88d87cee9c30a858facd3cd8348efdf94
GitHub-Last-Rev: 88ac1c9c41
GitHub-Pull-Request: golang/go#76026
Reviewed-on: https://go-review.googlesource.com/c/go/+/714360
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Jorropo <jorropo.pgm@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
This commit is contained in:
Jes Cok 2025-10-25 16:41:11 +00:00 committed by Gopher Robot
parent 5dcaf9a01b
commit f527994c61

View file

@ -52,7 +52,7 @@ type Once struct {
func (o *Once) Do(f func()) {
// Note: Here is an incorrect implementation of Do:
//
// if o.done.CompareAndSwap(0, 1) {
// if o.done.CompareAndSwap(false, true) {
// f()
// }
//