Remove the useless code line

This commit is contained in:
Andy Pan 2020-01-16 11:52:49 +08:00
parent d3e44612e2
commit b7fb5f33c9
1 changed files with 1 additions and 2 deletions

View File

@ -198,9 +198,8 @@ func (p *PoolWithFunc) Release() {
atomic.StoreInt32(&p.release, 1) atomic.StoreInt32(&p.release, 1)
p.lock.Lock() p.lock.Lock()
idleWorkers := p.workers idleWorkers := p.workers
for i, w := range idleWorkers { for _, w := range idleWorkers {
w.args <- nil w.args <- nil
idleWorkers[i] = nil
} }
p.workers = nil p.workers = nil
p.lock.Unlock() p.lock.Unlock()