Fixes #42160.
Change-Id: I9bf8b6f0bf1eccd3ab32cbd94c812f768746d291
Reviewed-on: https://go-review.googlesource.com/c/go/+/264557
Trust: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
)
// Once is an object that will perform exactly one action.
+//
+// A Once must not be copied after first use.
type Once struct {
// done indicates whether the action has been performed.
// It is first in the struct because it is used in the hot path.