mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
Fix time.Ticker name
parent
cd2ce9b01c
commit
3788f39d5e
@ -9,7 +9,7 @@ For higher rates, prefer a token bucket rate limiter such as [golang.org/x/time/
|
||||
import "time"
|
||||
|
||||
rate := time.Second / 10
|
||||
throttle := time.Tick(rate)
|
||||
throttle := time.Ticker(rate)
|
||||
for req := range requests {
|
||||
<-throttle // rate limit our Service.Method RPCs
|
||||
go client.Call("Service.Method", req, ...)
|
||||
|
Loading…
x
Reference in New Issue
Block a user