From e8ccc8eccadfa5efaddea16b781a8fd1e954abd7 Mon Sep 17 00:00:00 2001 From: AndyPan Date: Sun, 30 Sep 2018 09:40:33 +0800 Subject: [PATCH] format --- pool.go | 4 ++-- pool_func.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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]