golang 限制goroutine的数量

1.channel+sync

⽆缓冲channel和任务发送/执⾏分离来限制(协程池)

原文地址:https://www.cnblogs.com/peteremperor/p/14068669.html