Remove some useless code

This commit is contained in:
Andy Pan 2019-09-03 09:29:26 +08:00
parent 9d68c36305
commit 89644d035c
2 changed files with 0 additions and 2 deletions

View File

@ -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()

View File

@ -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()