diff options
Diffstat (limited to 'src/sync/once.go')
| -rw-r--r-- | src/sync/once.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/sync/once.go b/src/sync/once.go index ca04408224..8844314e7e 100644 --- a/src/sync/once.go +++ b/src/sync/once.go @@ -9,11 +9,13 @@ import ( ) // 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. // The hot path is inlined at every call site. - // Placing done first allows more compact instructions on some architectures (amd64/x86), + // Placing done first allows more compact instructions on some architectures (amd64/386), // and fewer instructions (to calculate offset) on other architectures. done uint32 m Mutex |
