Add adds a new caller to the wait list
(ch chan error)
| 48 | |
| 49 | // Add adds a new caller to the wait list |
| 50 | func (a *DebounceArray) Add(ch chan error) int { |
| 51 | a.lock.Lock() |
| 52 | defer a.lock.Unlock() |
| 53 | |
| 54 | a.array = append(a.array, ch) |
| 55 | return len(a.array) |
| 56 | } |
| 57 | |
| 58 | // Notify signals all interested callers that the event is completed |
| 59 | func (a *DebounceArray) Notify(err error) { |