Remove note that sync.Cond, sync.Mutex, sync.RWMutex and atomic.Value
can be created as part of other data structures. Structs can be embedded
by default, and default should not be repeated.
Fixes #20471.
Change-Id: If3f5703d3f60abd96482b58ca43450d02a9e645a
Reviewed-on: https://go-review.googlesource.com/44071
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
)
// A Value provides an atomic load and store of a consistently typed value.
-// Values can be created as part of other data structures.
// The zero value for a Value returns nil from Load.
// Once Store has been called, a Value must not be copied.
//
// which must be held when changing the condition and
// when calling the Wait method.
//
-// A Cond can be created as part of other structures.
// A Cond must not be copied after first use.
type Cond struct {
noCopy noCopy
func throw(string) // provided by runtime
// A Mutex is a mutual exclusion lock.
-// Mutexes can be created as part of other structures;
-// the zero value for a Mutex is an unlocked mutex.
+// The zero value for a Mutex is an unlocked mutex.
//
// A Mutex must not be copied after first use.
type Mutex struct {
// An RWMutex is a reader/writer mutual exclusion lock.
// The lock can be held by an arbitrary number of readers or a single writer.
-// RWMutexes can be created as part of other structures;
-// the zero value for a RWMutex is an unlocked mutex.
+// The zero value for a RWMutex is an unlocked mutex.
//
// An RWMutex must not be copied after first use.
//