Set invokes the wrapped diode's Set with the given data and uses Broadcast to wake up any readers.
(data GenericDataType)
| 53 | // Set invokes the wrapped diode's Set with the given data and uses Broadcast |
| 54 | // to wake up any readers. |
| 55 | func (w *Waiter) Set(data GenericDataType) { |
| 56 | w.Diode.Set(data) |
| 57 | w.c.Broadcast() |
| 58 | } |
| 59 | |
| 60 | // Next returns the next data point on the wrapped diode. If there is not any |
| 61 | // new data, it will Wait for set to be called or the context to be done. |