Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mutex ¶ added in v1.23.7
type Mutex struct {
// contains filtered or unexported fields
}
Mutex implements a mutex with a Broadcast. Implements a mutex that accepts a Context. An empty value Mutex{} is valid.
func (*Mutex) Lock ¶ added in v1.23.7
Lock attempts to hold a lock on the Mutex. Returns a lock release function or an error.
type MutexLocker ¶ added in v1.23.7
type MutexLocker struct {
// contains filtered or unexported fields
}
MutexLocker implements Locker for a Mutex.
func (*MutexLocker) Lock ¶ added in v1.23.7
func (l *MutexLocker) Lock()
Lock implements the sync.Locker interface.
func (*MutexLocker) Unlock ¶ added in v1.23.7
func (l *MutexLocker) Unlock()
Unlock implements the sync.Locker interface.
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.