Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RWMutex ¶
type RWMutex interface { Mutex RLock() RUnlock() }
func NewRWMutex ¶
func NewRWMutex() RWMutex
type TimeoutCond ¶ added in v0.14.22
TimeoutCond is a variant on Cond. It has roughly the same semantics regarding 'L' - it must be held both when broadcasting and when calling TimeoutCondWaiter.Wait() Call Broadcast() to broadcast to all waiters on the TimeoutCond. Call SetupWait to create a TimeoutCondWaiter configured with the given timeout, which can then be used to listen for broadcasts.
func NewTimeoutCond ¶ added in v0.14.22
func NewTimeoutCond(l sync.Locker) *TimeoutCond
func (*TimeoutCond) Broadcast ¶ added in v0.14.22
func (c *TimeoutCond) Broadcast()
func (*TimeoutCond) SetupWait ¶ added in v0.14.22
func (c *TimeoutCond) SetupWait(timeout time.Duration) *TimeoutCondWaiter
type TimeoutCondWaiter ¶ added in v0.14.22
type TimeoutCondWaiter struct {
// contains filtered or unexported fields
}
TimeoutCondWaiter is a type allowing a consumer to wait on a TimeoutCond with a timeout. Wait() may be called multiple times, and will return true every time that the TimeoutCond is broadcast to. Once the configured timeout expires, Wait() will return false. Call Stop() to release resources once this TimeoutCondWaiter is no longer needed.
func (*TimeoutCondWaiter) Stop ¶ added in v0.14.22
func (w *TimeoutCondWaiter) Stop()
func (*TimeoutCondWaiter) Wait ¶ added in v0.14.22
func (w *TimeoutCondWaiter) Wait() bool