刚看完一篇Go并发的文章,goroutine池那块儿讲得真好啊...感觉自己之前写的代码太 naive 了
func workerPool() {
for i := 0; i < 10; i++ {
go doWork(i)
}
}
登录/注册