mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 18:11:03 +00:00
Merge branch 'develop'
This commit is contained in:
commit
01cb40f8fb
2
pool.go
2
pool.go
@ -75,8 +75,8 @@ func (p *Pool) periodicallyPurge() {
|
||||
w.task <- nil
|
||||
idleWorkers[i] = nil
|
||||
}
|
||||
n++
|
||||
if n > 0 {
|
||||
n++
|
||||
p.workers = idleWorkers[n:]
|
||||
}
|
||||
p.lock.Unlock()
|
||||
|
||||
@ -77,8 +77,8 @@ func (p *PoolWithFunc) periodicallyPurge() {
|
||||
w.args <- nil
|
||||
idleWorkers[i] = nil
|
||||
}
|
||||
n++
|
||||
if n > 0 {
|
||||
n++
|
||||
p.workers = idleWorkers[n:]
|
||||
}
|
||||
p.lock.Unlock()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user