From 65b3ac9ff7af7677695624e87eac6d02691d2cd0 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Fri, 25 Jan 2019 22:01:11 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=89=20Optimize=20code=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pool.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pool.go b/pool.go index cc55242..b1599e9 100644 --- a/pool.go +++ b/pool.go @@ -119,7 +119,7 @@ func NewTimingPool(size, expiry int) (*Pool, error) { return p, nil } -//------------------------------------------------------------------------- +//--------------------------------------------------------------------------- // Submit submits a task to this pool. func (p *Pool) Submit(task f) error { @@ -173,7 +173,7 @@ func (p *Pool) Release() error { return nil } -//------------------------------------------------------------------------- +//--------------------------------------------------------------------------- // incRunning increases the number of the currently running goroutines. func (p *Pool) incRunning() { @@ -230,7 +230,7 @@ func (p *Pool) putWorker(worker *Worker) { worker.recycleTime = time.Now() p.lock.Lock() p.workers = append(p.workers, worker) - // Notify there is an available worker put back into queue. + // Notify the invoker stuck in 'getWorker()' of there is an available worker in the worker queue. p.cond.Signal() p.lock.Unlock() -} +} \ No newline at end of file