Dying returns the channel that can be used to wait until t.Kill is called.
()
| 124 | // Dying returns the channel that can be used to wait until |
| 125 | // t.Kill is called. |
| 126 | func (t *Tomb) Dying() <-chan struct{} { |
| 127 | t.init() |
| 128 | return t.dying |
| 129 | } |
| 130 | |
| 131 | // Wait blocks until all goroutines have finished running, and |
| 132 | // then returns the reason for their death. |