remove meaningless if

This commit is contained in:
SimePel 2018-10-01 19:45:21 +07:00
parent 1b62696050
commit d9eac77ae5
1 changed files with 2 additions and 4 deletions

View File

@ -146,10 +146,8 @@ func (p *Pool) ReSize(size int) {
}
atomic.StoreInt32(&p.capacity, int32(size))
diff := p.Running() - size
if diff > 0 {
for i := 0; i < diff; i++ {
p.getWorker().task <- nil
}
for i := 0; i < diff; i++ {
p.getWorker().task <- nil
}
}