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