Skip to content

Conversation

@husy-dev
Copy link
Contributor

func (p *WorkerPool) dispatch() {
	for i := 0; i < p.maxWorkers; i++ {
		p.taskQueue[i] = make(chan func(), 1024)
		go startWorker(p.taskQueue[i])
	}
}

since function dispatch execute startWorker by goroutine, there is no need for startWorker to use goroutine inside.

@chowyu08 chowyu08 merged commit 8430749 into fhmq:master Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants