diff --git a/pool.go b/pool.go index cff7488..3eca571 100644 --- a/pool.go +++ b/pool.go @@ -207,8 +207,8 @@ func (p *Pool) retrieveWorker() *Worker { pool: p, task: make(chan f, workerChanCap), } - w.run() } + w.run() } else { for { p.cond.Wait() diff --git a/pool_func.go b/pool_func.go index d0a5cd3..2f29255 100644 --- a/pool_func.go +++ b/pool_func.go @@ -211,8 +211,8 @@ func (p *PoolWithFunc) retrieveWorker() *WorkerWithFunc { pool: p, args: make(chan interface{}, workerChanCap), } - w.run() } + w.run() } else { for { p.cond.Wait()