i write such test code
func main() {
l := rate.NewLimiter(100, 1)
var runCounts = new(atomic.Int64)
go func() {
for {
go func() {
t := time.Now()
ok := l.AllowN(t, 1)
if ok {
runCounts.Inc()
}
}()
}
}()
<-time.After(time.Second * 5)
fmt.Println(runCounts.Load())
return
}
i expect result is around 501, but actually it may be a very loard number like 12694.
is there any miss understanding?