Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroadcastCond ¶
type BroadcastCond struct {
// contains filtered or unexported fields
}
Can be used as zero-value. Due to the caller needing to bring their own synchronization, an equivalent to "sync".Cond.Signal is not provided. BroadcastCond is intended to be selected on with other channels.
func (*BroadcastCond) Broadcast ¶
func (me *BroadcastCond) Broadcast()
func (*BroadcastCond) Signaled ¶
func (me *BroadcastCond) Signaled() events.Signaled
Should be called before releasing locks on resources that might trigger subsequent Broadcasts. The channel is closed when the condition changes.
type Flag ¶
type Flag struct {
// contains filtered or unexported fields
}
Flag wraps a boolean value that starts as false (off). You can wait for it to be on or off, and set the value as needed.
type LevelTrigger ¶
type LevelTrigger struct {
// contains filtered or unexported fields
}
func (*LevelTrigger) Active ¶
func (me *LevelTrigger) Active() events.Active
func (*LevelTrigger) Signal ¶
func (me *LevelTrigger) Signal() events.Signal
type ReadOnlyFlag ¶ added in v0.5.0
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
Channel semaphore, as is popular for controlling access to limited resources. Should not be used zero-initialized.
func NewSemaphore ¶
Returns an initialized semaphore with n slots.