优化concurrent与rpc模块

This commit is contained in:
duanhf2012
2023-05-04 14:21:29 +08:00
parent ddeaaf7d77
commit 5675681ab1
2 changed files with 5 additions and 3 deletions

View File

@@ -80,7 +80,7 @@ func (d *dispatch) run() {
}
func (d *dispatch) processTimer() {
if d.idle == true && d.workerNum > d.minConcurrentNum {
if d.idle == true && d.workerNum > atomic.LoadInt32(&d.minConcurrentNum) {
d.processIdle()
}