mirror of https://github.com/panjf2000/ants.git
remove another one useless if statement
This commit is contained in:
parent
d9eac77ae5
commit
5ed168767a
|
@ -148,10 +148,8 @@ func (p *PoolWithFunc) ReSize(size int) {
|
|||
}
|
||||
atomic.StoreInt32(&p.capacity, int32(size))
|
||||
diff := p.Running() - size
|
||||
if diff > 0 {
|
||||
for i := 0; i < diff; i++ {
|
||||
p.getWorker().args <- nil
|
||||
}
|
||||
for i := 0; i < diff; i++ {
|
||||
p.getWorker().args <- nil
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue