Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RWMutex ¶
type RWMutex struct {
// contains filtered or unexported fields
}
RWMutex implements a RWMutex with a Broadcast. Implements a RWMutex that accepts a Context. An empty value RWMutex{} is valid.
func (*RWMutex) Lock ¶
Lock attempts to hold a lock on the RWMutex. Returns a lock release function or an error. A single writer OR many readers can hold Lock at a time. If a writer is waiting to lock, readers will wait for it.
func (*RWMutex) Locker ¶
Locker returns an RWMutexLocker that uses context.Background to write lock the RWMutex.
func (*RWMutex) RLocker ¶
RLocker returns an RWMutexLocker that uses context.Background to read lock the RWMutex.
type RWMutexLocker ¶
type RWMutexLocker struct {
// contains filtered or unexported fields
}
RWMutexLocker implements Locker for a RWMutex.
func (*RWMutexLocker) Lock ¶
func (l *RWMutexLocker) Lock()
Lock implements the sync.Locker interface.
func (*RWMutexLocker) Unlock ¶
func (l *RWMutexLocker) Unlock()
Unlock implements the sync.Locker interface.