Set turns on the event type on the box
(event EventType, value any)
| 37 | |
| 38 | // Set turns on the event type on the box |
| 39 | func (b *EventBox) Set(event EventType, value any) { |
| 40 | b.cond.L.Lock() |
| 41 | b.events[event] = value |
| 42 | if _, found := b.ignore[event]; !found { |
| 43 | b.cond.Broadcast() |
| 44 | } |
| 45 | b.cond.L.Unlock() |
| 46 | } |
| 47 | |
| 48 | // Clear clears the events |
| 49 | // Unsynchronized; should be called within Wait routine |
no outgoing calls