Commit 766e1ae3 authored by Joonas Kuorilehto's avatar Joonas Kuorilehto Committed by Brad Fitzpatrick

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/44071Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent d8899aca
......@@ -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.
//
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment