mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 18:11:03 +00:00
Remove some useless code
This commit is contained in:
parent
9d68c36305
commit
89644d035c
1
pool.go
1
pool.go
@ -288,7 +288,6 @@ func (p *Pool) retrieveWorker() *goWorker {
|
||||
// revertWorker puts a worker back into free pool, recycling the goroutines.
|
||||
func (p *Pool) revertWorker(worker *goWorker) bool {
|
||||
if atomic.LoadInt32(&p.release) == CLOSED || p.Running() > p.Cap() {
|
||||
worker.task <- nil
|
||||
return false
|
||||
}
|
||||
worker.recycleTime = time.Now()
|
||||
|
||||
@ -297,7 +297,6 @@ func (p *PoolWithFunc) retrieveWorker() *goWorkerWithFunc {
|
||||
// revertWorker puts a worker back into free pool, recycling the goroutines.
|
||||
func (p *PoolWithFunc) revertWorker(worker *goWorkerWithFunc) bool {
|
||||
if atomic.LoadInt32(&p.release) == CLOSED || p.Running() > p.Cap() {
|
||||
worker.args <- nil
|
||||
return false
|
||||
}
|
||||
worker.recycleTime = time.Now()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user