()
| 105 | } |
| 106 | |
| 107 | func (t *Tomb) Terminated() bool { |
| 108 | t.init() |
| 109 | select { |
| 110 | case <-t.dead: |
| 111 | return true |
| 112 | default: |
| 113 | return false |
| 114 | } |
| 115 | } |
| 116 | |
| 117 | // Dead returns the channel that can be used to wait until |
| 118 | // all goroutines have finished running. |