We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
running与cap的比较判断与incRuning分开执行的, 可能会出现running大于cap的问题? `func (p *Pool) retrieveWorker() *Worker { var w *Worker
p.lock.Lock() idleWorkers := p.workers n := len(idleWorkers) - 1 if n >= 0 { w = idleWorkers[n] idleWorkers[n] = nil p.workers = idleWorkers[:n] p.lock.Unlock() } else if p.Running() < p.Cap() { p.lock.Unlock() if cacheWorker := p.workerCache.Get(); cacheWorker != nil { w = cacheWorker.(*Worker) } else { w = &Worker{ pool: p, task: make(chan func(), workerChanCap), } } w.run()`
The text was updated successfully, but these errors were encountered:
不会的,incRunning操作总是在比较大小之后才发生的。
Sorry, something went wrong.
合并到#28
No branches or pull requests
running与cap的比较判断与incRuning分开执行的, 可能会出现running大于cap的问题?
`func (p *Pool) retrieveWorker() *Worker {
var w *Worker
The text was updated successfully, but these errors were encountered: