mirror of
https://github.com/fhmq/hmq.git
synced 2026-04-28 04:28:34 +00:00
add config for work chan
This commit is contained in:
@@ -37,7 +37,7 @@ func (p *WorkerPool) Submit(uid string, task func()) {
|
||||
|
||||
func (p *WorkerPool) dispatch() {
|
||||
for i := 0; i < p.maxWorkers; i++ {
|
||||
p.taskQueue[i] = make(chan func())
|
||||
p.taskQueue[i] = make(chan func(), 1024)
|
||||
go startWorker(p.taskQueue[i])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user