Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cond ¶
Cond is a conditional variable implementation that uses channels for notifications. It only supports .Broadcast() method, however supports timeout based Wait() calls unlike regular sync.Cond.
func (*Cond) Broadcast ¶
func (c *Cond) Broadcast()
Broadcast notifies all waiting goroutines that something has changed.
func (*Cond) NotifyChan ¶
func (c *Cond) NotifyChan() <-chan struct{}
NotifyChan returns a channel that can be used to wait for next Broadcast() call.
func (*Cond) Wait ¶
func (c *Cond) Wait()
Wait waits for Broadcast calls. Similar to regular sync.Cond, this unlocks the underlying locker first, waits on changes and re-locks it before returning.
func (*Cond) WaitWithTimeout ¶
WaitWithTimeout is same as Wait() call, but will only wait up to a given timeout.
Click to show internal directories.
Click to hide internal directories.