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