(out chan<- watch.Event)
| 25 | ) |
| 26 | |
| 27 | func newEventProcessor(out chan<- watch.Event) *eventProcessor { |
| 28 | return &eventProcessor{ |
| 29 | out: out, |
| 30 | cond: sync.NewCond(&sync.Mutex{}), |
| 31 | done: make(chan struct{}), |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | // eventProcessor buffers events and writes them to an out chan when a reader |
| 36 | // is waiting. Because of the requirement to buffer events, it synchronizes |
no outgoing calls