mirror of
https://github.com/panjf2000/ants.git
synced 2025-12-16 18:11:03 +00:00
add some annotations
This commit is contained in:
parent
846a758f65
commit
d052cf95e1
2
pool.go
2
pool.go
@ -224,7 +224,7 @@ func (p *Pool) putWorker(worker *Worker) {
|
||||
worker.recycleTime = time.Now()
|
||||
p.lock.Lock()
|
||||
p.workers = append(p.workers, worker)
|
||||
//通知有一个空闲的worker
|
||||
// notify there is available worker
|
||||
p.cond.Signal()
|
||||
p.lock.Unlock()
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ func (p *PoolWithFunc) putWorker(worker *WorkerWithFunc) {
|
||||
worker.recycleTime = time.Now()
|
||||
p.lock.Lock()
|
||||
p.workers = append(p.workers, worker)
|
||||
//通知有一个空闲的worker
|
||||
// notify there is available worker
|
||||
p.cond.Signal()
|
||||
p.lock.Unlock()
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user