diff --git a/pool.go b/pool.go index 8fee19f..ac575b8 100644 --- a/pool.go +++ b/pool.go @@ -196,10 +196,10 @@ func (p *Pool) getWorker() *Worker { } if waiting { - for{ + for { p.cond.Wait() l := len(p.workers) - 1 - if l < 0{ + if l < 0 { continue } w = p.workers[l] diff --git a/pool_func.go b/pool_func.go index f0c75e5..074710e 100644 --- a/pool_func.go +++ b/pool_func.go @@ -198,10 +198,10 @@ func (p *PoolWithFunc) getWorker() *WorkerWithFunc { } if waiting { - for{ + for { p.cond.Wait() l := len(p.workers) - 1 - if l < 0{ + if l < 0 { continue } w = p.workers[l]