add some annotations

This commit is contained in:
Andy Pan 2018-12-01 18:41:42 +08:00
parent 846a758f65
commit d052cf95e1
2 changed files with 2 additions and 2 deletions

View File

@ -224,7 +224,7 @@ func (p *Pool) putWorker(worker *Worker) {
worker.recycleTime = time.Now() worker.recycleTime = time.Now()
p.lock.Lock() p.lock.Lock()
p.workers = append(p.workers, worker) p.workers = append(p.workers, worker)
//通知有一个空闲的worker // notify there is available worker
p.cond.Signal() p.cond.Signal()
p.lock.Unlock() p.lock.Unlock()
} }

View File

@ -227,7 +227,7 @@ func (p *PoolWithFunc) putWorker(worker *WorkerWithFunc) {
worker.recycleTime = time.Now() worker.recycleTime = time.Now()
p.lock.Lock() p.lock.Lock()
p.workers = append(p.workers, worker) p.workers = append(p.workers, worker)
//通知有一个空闲的worker // notify there is available worker
p.cond.Signal() p.cond.Signal()
p.lock.Unlock() p.lock.Unlock()
} }