mirror of https://github.com/panjf2000/ants.git
Merge branch 'develop'
This commit is contained in:
commit
afc0d406f8
3
pool.go
3
pool.go
|
@ -106,6 +106,9 @@ func (p *Pool) Release() error {
|
|||
for i := 0; i < running; i++ {
|
||||
p.getWorker().stop()
|
||||
}
|
||||
for i := range p.workers{
|
||||
p.workers[i] = nil
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -111,6 +111,9 @@ func (p *PoolWithFunc) Release() error {
|
|||
for i := 0; i < running; i++ {
|
||||
p.getWorker().stop()
|
||||
}
|
||||
for i := range p.workers{
|
||||
p.workers[i] = nil
|
||||
}
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue