golang: 使用有缓存通道对goroutine并发数控制
首先发布于我的gist
package main
import (
"fmt"
"html"
"io/ioutil"
"log"
"net/http"
"sync"
"time"
)
func GetConcurrently() {
// set limit to 10, and make a buffered channel
limit := 10
limiterChan...
原创
2019-09-23 09:10:36 ·
243 阅读 ·
0 评论