From b7fb5f33c90abab021f8d780cd6d4540374dc05a Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Thu, 16 Jan 2020 11:52:49 +0800 Subject: [PATCH] Remove the useless code line --- pool_func.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pool_func.go b/pool_func.go index e062ae8..241753e 100644 --- a/pool_func.go +++ b/pool_func.go @@ -198,9 +198,8 @@ func (p *PoolWithFunc) Release() { atomic.StoreInt32(&p.release, 1) p.lock.Lock() idleWorkers := p.workers - for i, w := range idleWorkers { + for _, w := range idleWorkers { w.args <- nil - idleWorkers[i] = nil } p.workers = nil p.lock.Unlock()