Stop stops the pool and waits for all workers to return.
()
| 77 | |
| 78 | // Stop stops the pool and waits for all workers to return. |
| 79 | func (pool *WorkerPool) Stop() { |
| 80 | pool.quitOnce.Do(func() { close(pool.quit) }) |
| 81 | pool.wg.Wait() |
| 82 | } |
| 83 | |
| 84 | // Expand is for putting more 'Worker's into work. If there is'nt any job to do, |
| 85 | // and a timeout is set, they will simply get timed-out. |
no outgoing calls