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