Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountingRWMutex ¶
type CountingRWMutex struct {
// contains filtered or unexported fields
}
CountingRWMutex is a RWMutex that keeps track of the number of goroutines waiting for the lock.
func NewCountingRWMutex ¶
func NewCountingRWMutex(limit int) *CountingRWMutex
func (*CountingRWMutex) RUnlock ¶
func (rw *CountingRWMutex) RUnlock()
RUnlock undoes a single RLock call; it does not affect other simultaneous readers.
func (*CountingRWMutex) TryLock ¶
func (rw *CountingRWMutex) TryLock() bool
TryLock tries to lock rw for writing if the pending waitinger is less than the limit.
func (*CountingRWMutex) Unlock ¶
func (rw *CountingRWMutex) Unlock()
Unlock undoes a single Lock call; it does not affect other simultaneous readers.
func (*CountingRWMutex) Waiters ¶
func (rw *CountingRWMutex) Waiters() int64
Waiters returns the number of goroutines waiting for the lock.
Click to show internal directories.
Click to hide internal directories.