From b6e43aeee3ed4dc91ab26f0bd6d403b08fc61194 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Fri, 25 Jan 2019 22:01:25 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=AF=20Optimize=20code=20comments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pool_func.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pool_func.go b/pool_func.go index fb998b6..e026f50 100644 --- a/pool_func.go +++ b/pool_func.go @@ -121,7 +121,7 @@ func NewTimingPoolWithFunc(size, expiry int, f pf) (*PoolWithFunc, error) { return p, nil } -//------------------------------------------------------------------------- +//--------------------------------------------------------------------------- // Serve submits a task to pool. func (p *PoolWithFunc) Serve(args interface{}) error { @@ -175,7 +175,7 @@ func (p *PoolWithFunc) Release() error { return nil } -//------------------------------------------------------------------------- +//--------------------------------------------------------------------------- // incRunning increases the number of the currently running goroutines. func (p *PoolWithFunc) incRunning() { @@ -233,7 +233,7 @@ func (p *PoolWithFunc) putWorker(worker *WorkerWithFunc) { 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