mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 18:11:03 +00:00
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…
x
Reference in New Issue
Block a user