4 "github.com/anacrolix/sync"
7 // Can be used as zero-value. Due to the caller needing to bring their own synchronization, an
8 // eqiuvalent to "sync".Cond.Signal is not provided. BroadcastCond is intended to be selected on
9 // with other channels.
10 type BroadcastCond struct {
15 func (me *BroadcastCond) Broadcast() {
24 // Should be called before releasing locks on resources that might trigger subsequent Broadcasts.
25 // The channel is closed when the condition changes.
26 func (me *BroadcastCond) Signaled() Signaled {
30 me.ch = make(chan struct{})