Close executes all the notification handlers if they have not yet been executed.
()
| 60 | |
| 61 | // Close executes all the notification handlers if they have not yet been executed. |
| 62 | func (h *Handler) Close() { |
| 63 | h.once.Do(func() { |
| 64 | for _, fn := range h.notify { |
| 65 | fn() |
| 66 | } |
| 67 | }) |
| 68 | } |
| 69 | |
| 70 | // Signal is called when an os.Signal is received, and guarantees that all notifications |
| 71 | // are executed, then the final handler is executed. This function should only be called once |
no outgoing calls