]> Cypherpunks repositories - gostls13.git/commitdiff
sync: remove note about creating with structures
authorJoonas Kuorilehto <joneskoo@derbian.fi>
Wed, 24 May 2017 17:37:53 +0000 (20:37 +0300)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 7 Jun 2017 21:35:20 +0000 (21:35 +0000)
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>
src/sync/atomic/value.go
src/sync/cond.go
src/sync/mutex.go
src/sync/rwmutex.go

index 30abf726344e96f3955df6101fbdc468ab44a3d9..1fc1f681f2024ca051dead986f299c9b480527ff 100644 (file)
@@ -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.
 //
index c070d9d84ef9e5ba39ecca820e747028d55c77ad..14e2f6b24d4ad53ce603045a7dae3ffd2206506b 100644 (file)
@@ -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
index 506b23f6ffff940d90813c39171a6cb1df220e03..1232c629b180b1375e5e825b6a399445decb1fe1 100644 (file)
@@ -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 {
index 55b69f2bb8c5bf8b5b3d2a2be5dcb2d34ecacb04..a8607d91674a38901c026dfa033610f49db15804 100644 (file)
@@ -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.
 //