From: Jes Cok Date: Sat, 25 Oct 2025 16:41:11 +0000 (+0000) Subject: sync: update comments for Once.done X-Git-Tag: go1.26rc1~474 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=f527994c61;p=gostls13.git sync: update comments for Once.done Sync with CL 666895. Change-Id: I49c4a7f88d87cee9c30a858facd3cd8348efdf94 GitHub-Last-Rev: 88ac1c9c4131aa3f5dfb9c7923e49e46808c409d GitHub-Pull-Request: golang/go#76026 Reviewed-on: https://go-review.googlesource.com/c/go/+/714360 LUCI-TryBot-Result: Go LUCI Auto-Submit: Jorropo Reviewed-by: Michael Knyszek Reviewed-by: David Chase Reviewed-by: Jorropo --- diff --git a/src/sync/once.go b/src/sync/once.go index 1573b28b28..7c9ad8dd1a 100644 --- a/src/sync/once.go +++ b/src/sync/once.go @@ -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() // } //