forked from mirror/ants
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()
|
worker.recycleTime = time.Now()
|
||||||
p.lock.Lock()
|
p.lock.Lock()
|
||||||
p.workers = append(p.workers, worker)
|
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.cond.Signal()
|
||||||
p.lock.Unlock()
|
p.lock.Unlock()
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,7 +229,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)
|
||||||
// notify there is available worker
|
// Notify there is an available worker put back into queue.
|
||||||
p.cond.Signal()
|
p.cond.Signal()
|
||||||
p.lock.Unlock()
|
p.lock.Unlock()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue