mirror of https://github.com/panjf2000/ants.git
update
This commit is contained in:
parent
afba560448
commit
339aaa4475
3
pool.go
3
pool.go
|
@ -76,9 +76,10 @@ func (p *Pool) monitorAndClear() {
|
|||
n = i
|
||||
w.stop()
|
||||
idleWorkers[i] = nil
|
||||
p.running--
|
||||
}
|
||||
if n > 0 {
|
||||
n += 1
|
||||
n++
|
||||
p.workers = idleWorkers[n:]
|
||||
}
|
||||
p.lock.Unlock()
|
||||
|
|
|
@ -77,6 +77,7 @@ func (p *PoolWithFunc) MonitorAndClear() {
|
|||
n = i
|
||||
w.stop()
|
||||
idleWorkers[i] = nil
|
||||
p.running--
|
||||
}
|
||||
if n > 0 {
|
||||
n += 1
|
||||
|
|
Loading…
Reference in New Issue