mirror of https://github.com/panjf2000/ants.git
supplement annotations
This commit is contained in:
parent
917dfb037f
commit
4320708756
2
pool.go
2
pool.go
|
@ -226,7 +226,7 @@ func (p *Pool) putWorker(worker *Worker) {
|
|||
worker.recycleTime = time.Now()
|
||||
p.lock.Lock()
|
||||
p.workers = append(p.workers, worker)
|
||||
// notify there is available worker
|
||||
// Notify there is an available worker put back into queue.
|
||||
p.cond.Signal()
|
||||
p.lock.Unlock()
|
||||
}
|
||||
|
|
|
@ -229,7 +229,7 @@ func (p *PoolWithFunc) putWorker(worker *WorkerWithFunc) {
|
|||
worker.recycleTime = time.Now()
|
||||
p.lock.Lock()
|
||||
p.workers = append(p.workers, worker)
|
||||
// notify there is available worker
|
||||
// Notify there is an available worker put back into queue.
|
||||
p.cond.Signal()
|
||||
p.lock.Unlock()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue