Find task in pool question
Opened this issue · 0 comments
CJayKao commented
Hi , I read this part fo code
func (p *Pool) worker(task func()) {
defer func() { <-p.sem }()
**task()**
**for task := range p.work {
**task()**
}**
}
question :
- why not just use range p.work do task() ?
- Do task() before that("range p.work") is essential?
Thank you