mirror of
https://github.com/fhmq/hmq.git
synced 2026-05-04 07:08:32 +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() {
|
func (p *WorkerPool) dispatch() {
|
||||||
for i := 0; i < p.maxWorkers; i++ {
|
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])
|
go startWorker(p.taskQueue[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user