remove number for source
This commit is contained in:
15
src/rate-limiting/rate-limiting.go
Normal file
15
src/rate-limiting/rate-limiting.go
Normal file
@@ -0,0 +1,15 @@
|
||||
// ## Rate Limiting
|
||||
package main
|
||||
|
||||
import "time"
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
throttle := time.Tick(time.Millisecond * 200)
|
||||
for {
|
||||
<-throttle
|
||||
go fmt.Println("rate-limited action")
|
||||
}
|
||||
}
|
||||
|
||||
// todo: credit code.google.com/p/go-wiki/wiki/RateLimiting
|
||||
Reference in New Issue
Block a user