(id string, fn func())
| 81 | } |
| 82 | |
| 83 | func (h *Handler) register(id string, fn func()) { |
| 84 | h.notifyMutex.Lock() |
| 85 | defer h.notifyMutex.Unlock() |
| 86 | |
| 87 | h.notify = append(h.notify, notify{ |
| 88 | id: id, |
| 89 | fn: fn, |
| 90 | }) |
| 91 | } |
| 92 | |
| 93 | func (h *Handler) unregister(id string) { |
| 94 | h.notifyMutex.Lock() |