mirror of
https://github.com/duanhf2012/origin.git
synced 2026-02-17 18:04:44 +08:00
优化并发模块
This commit is contained in:
@@ -69,6 +69,10 @@ func (c *Concurrent) AsyncDoByQueue(queueId int64, fn func(), cb func(err error)
|
||||
return
|
||||
}
|
||||
|
||||
if queueId != 0 {
|
||||
queueId = queueId % maxTaskQueueSessionId+1
|
||||
}
|
||||
|
||||
select {
|
||||
case c.tasks <- task{queueId, fn, cb}:
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user