mirror of
https://github.com/golang/go
synced 2024-09-30 03:24:39 -06:00
sync: remove note about creating with structures
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>
This commit is contained in:
parent
d8899acaf8
commit
766e1ae362
@ -9,7 +9,6 @@ import (
|
||||
)
|
||||
|
||||
// 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.
|
||||
//
|
||||
|
@ -17,7 +17,6 @@ import (
|
||||
// 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
|
||||
|
@ -19,8 +19,7 @@ import (
|
||||
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 {
|
||||
|
@ -12,8 +12,7 @@ import (
|
||||
|
||||
// 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.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user