Open maczam opened 4 years ago
In the process of using ratelimit,there's a lock in the source code . can you replace it with atomic?
func (tb *Bucket) TakeAvailable(count int64) int64 { tb.mu.Lock() defer tb.mu.Unlock() return tb.takeAvailable(tb.clock.Now(), count) }
Similar https://github.com/uber-go/ratelimit https://github.com/maczam/ymratelimit
In the process of using ratelimit,there's a lock in the source code . can you replace it with atomic?