Merge branch 'master' into develop

This commit is contained in:
Andy Pan 2018-10-02 22:39:31 +08:00
commit 418888be9d
2 changed files with 4 additions and 8 deletions

View File

@ -146,11 +146,9 @@ 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
}
}
}
// Release Closes this pool.

View File

@ -148,11 +148,9 @@ 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
}
}
}
// Release Closed this pool.