mirror of https://github.com/golang/go.git
sync: refer to Locker interface methods in RWMutex.RLocker doc
The methods being implemented are part of the Locker interface, not the RWMutex struct. Fixes #68250. Change-Id: I609c4d5c44e90a12914a8678971ba295519cc265 Reviewed-on: https://go-review.googlesource.com/c/go/+/595875 Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
c33144c47c
commit
cdbf5f2f7e
|
|
@ -234,7 +234,7 @@ func syscall_hasWaitingReaders(rw *RWMutex) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
// RLocker returns a [Locker] interface that implements
|
// RLocker returns a [Locker] interface that implements
|
||||||
// the [RWMutex.Lock] and [RWMutex.Unlock] methods by calling rw.RLock and rw.RUnlock.
|
// the [Locker.Lock] and [Locker.Unlock] methods by calling rw.RLock and rw.RUnlock.
|
||||||
func (rw *RWMutex) RLocker() Locker {
|
func (rw *RWMutex) RLocker() Locker {
|
||||||
return (*rlocker)(rw)
|
return (*rlocker)(rw)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue