forked from mirror/ants
optimization for GC
This commit is contained in:
parent
813cc218fe
commit
d77f01cf9a
1
pool.go
1
pool.go
|
@ -148,6 +148,7 @@ func (p *Pool) Release() error {
|
|||
for i := range p.workers {
|
||||
p.workers[i] = nil
|
||||
}
|
||||
p.workers = nil
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -153,6 +153,7 @@ func (p *PoolWithFunc) Release() error {
|
|||
for i := range p.workers {
|
||||
p.workers[i] = nil
|
||||
}
|
||||
p.workers = nil
|
||||
})
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue