mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-17 18:51:02 +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
|
n = i
|
||||||
w.stop()
|
w.stop()
|
||||||
idleWorkers[i] = nil
|
idleWorkers[i] = nil
|
||||||
|
p.running--
|
||||||
}
|
}
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
n += 1
|
n++
|
||||||
p.workers = idleWorkers[n:]
|
p.workers = idleWorkers[n:]
|
||||||
}
|
}
|
||||||
p.lock.Unlock()
|
p.lock.Unlock()
|
||||||
|
|||||||
@ -77,6 +77,7 @@ func (p *PoolWithFunc) MonitorAndClear() {
|
|||||||
n = i
|
n = i
|
||||||
w.stop()
|
w.stop()
|
||||||
idleWorkers[i] = nil
|
idleWorkers[i] = nil
|
||||||
|
p.running--
|
||||||
}
|
}
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
n += 1
|
n += 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user