diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-02-18 09:50:58 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-02-18 09:53:27 +0100 |
commit | 91664defe0a75da15661a37a7f585b0c8523bf4e (patch) | |
tree | 8d7133037ce477c00ba0408d3f0892e0a8b5744d /src/pkg/sync/rwmutex.go | |
parent | ac2d3c9eb73a2d23848c55c3171d8ff6dd0feed9 (diff) | |
download | golang-91664defe0a75da15661a37a7f585b0c8523bf4e.tar.gz |
Imported Upstream version 2011.02.15
Diffstat (limited to 'src/pkg/sync/rwmutex.go')
-rw-r--r-- | src/pkg/sync/rwmutex.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/pkg/sync/rwmutex.go b/src/pkg/sync/rwmutex.go index 06fd0b0ff..25696aca2 100644 --- a/src/pkg/sync/rwmutex.go +++ b/src/pkg/sync/rwmutex.go @@ -64,12 +64,10 @@ func (rw *RWMutex) Lock() { rw.r.Unlock() } -// Unlock unlocks rw for writing. -// It is a run-time error if rw is not locked for writing -// on entry to Unlock. +// Unlock unlocks rw for writing. It is a run-time error if rw is +// not locked for writing on entry to Unlock. // -// Like for Mutexes, -// a locked RWMutex is not associated with a particular goroutine. -// It is allowed for one goroutine to RLock (Lock) an RWMutex and then +// As with Mutexes, a locked RWMutex is not associated with a particular +// goroutine. One goroutine may RLock (Lock) an RWMutex and then // arrange for another goroutine to RUnlock (Unlock) it. func (rw *RWMutex) Unlock() { rw.w.Unlock() } |