mirror of
https://github.com/golang/go
synced 2024-11-21 19:24:45 -07:00
sync: a couple of documentation nits.
R=golang-dev, agl1 CC=golang-dev https://golang.org/cl/4079051
This commit is contained in:
parent
d08df51366
commit
08a206cc9e
@ -5,7 +5,7 @@
|
||||
// The sync package provides basic synchronization primitives
|
||||
// such as mutual exclusion locks. Other than the Once type,
|
||||
// most are intended for use by low-level library routines.
|
||||
// Higher-level synchronization is better done via channels
|
||||
// Higher-level synchronization is better done via channels
|
||||
// and communication.
|
||||
package sync
|
||||
|
||||
|
@ -13,7 +13,7 @@ type Once struct {
|
||||
// Do calls the function f if and only if the method is being called for the
|
||||
// first time with this receiver. In other words, given
|
||||
// var once Once
|
||||
// if Do(f) is called multiple times, only the first call will invoke f,
|
||||
// if once.Do(f) is called multiple times, only the first call will invoke f,
|
||||
// even if f has a different value in each invocation. A new instance of
|
||||
// Once is required for each function to execute.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user