udoprog / leaky-bucket

A token-based rate limiter based on the leaky bucket algorithm.
Apache License 2.0
93 stars 10 forks source link

More tokio #6

Closed udoprog closed 4 years ago

udoprog commented 4 years ago

While troubleshooting #5 I took the time to rewrite the acquire logic to use an async fn. Wakeup notification is now handled using a oneshot instead of the Waker / AtomicBool pair.