Go submits a task to the pool. If all goroutines in the pool are busy, a call to Go() will block until the task can be started.
(f func() error)
| 26 | // Go submits a task to the pool. If all goroutines in the pool |
| 27 | // are busy, a call to Go() will block until the task can be started. |
| 28 | func (p *ErrorPool) Go(f func() error) { |
| 29 | p.pool.Go(func() { |
| 30 | p.addErr(f()) |
| 31 | }) |
| 32 | } |
| 33 | |
| 34 | // Wait cleans up any spawned goroutines, propagating any panics and |
| 35 | // returning any errors from tasks. |