Go spawns a new goroutine in the WaitGroup.
(f func())
| 26 | |
| 27 | // Go spawns a new goroutine in the WaitGroup. |
| 28 | func (h *WaitGroup) Go(f func()) { |
| 29 | h.wg.Add(1) |
| 30 | go func() { |
| 31 | defer h.wg.Done() |
| 32 | h.pc.Try(f) |
| 33 | }() |
| 34 | } |
| 35 | |
| 36 | // Wait will block until all goroutines spawned with Go exit and will |
| 37 | // propagate any panics spawned in a child goroutine. |