Wait cleans up spawned goroutines, propagating any panics that were raised by a tasks.
()
| 72 | // Wait cleans up spawned goroutines, propagating any panics that were |
| 73 | // raised by a tasks. |
| 74 | func (p *Pool) Wait() { |
| 75 | p.init() |
| 76 | |
| 77 | close(p.tasks) |
| 78 | |
| 79 | p.handle.Wait() |
| 80 | } |
| 81 | |
| 82 | // MaxGoroutines returns the maximum size of the pool. |
| 83 | func (p *Pool) MaxGoroutines() int { |