remove another one useless if statement

This commit is contained in:
SimePel 2018-10-02 08:18:34 +07:00
parent d9eac77ae5
commit 5ed168767a
1 changed files with 2 additions and 4 deletions

View File

@ -148,11 +148,9 @@ func (p *PoolWithFunc) ReSize(size int) {
} }
atomic.StoreInt32(&p.capacity, int32(size)) atomic.StoreInt32(&p.capacity, int32(size))
diff := p.Running() - size diff := p.Running() - size
if diff > 0 {
for i := 0; i < diff; i++ { for i := 0; i < diff; i++ {
p.getWorker().args <- nil p.getWorker().args <- nil
} }
}
} }
// Release Closed this pool. // Release Closed this pool.