revert

Jérôme Laforge 2019-06-26 08:50:48 +02:00
parent 3788f39d5e
commit 78be9b4e94

@ -9,7 +9,7 @@ For higher rates, prefer a token bucket rate limiter such as [golang.org/x/time/
import "time" import "time"
rate := time.Second / 10 rate := time.Second / 10
throttle := time.Ticker(rate) throttle := time.Tick(rate)
for req := range requests { for req := range requests {
<-throttle // rate limit our Service.Method RPCs <-throttle // rate limit our Service.Method RPCs
go client.Call("Service.Method", req, ...) go client.Call("Service.Method", req, ...)