From 89644d035c8dc3281168003a0c183a1fb97a24c2 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Tue, 3 Sep 2019 09:29:26 +0800 Subject: [PATCH] Remove some useless code --- pool.go | 1 - pool_func.go | 1 - 2 files changed, 2 deletions(-) diff --git a/pool.go b/pool.go index cc0c7d9..75741de 100644 --- a/pool.go +++ b/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() diff --git a/pool_func.go b/pool_func.go index 6a862e0..8ffe3ad 100644 --- a/pool_func.go +++ b/pool_func.go @@ -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()