You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i'm wrapping my object with RateLimit object and with 1 times per 1 second limit, and then call it 6 times - i've got 6 calls to poll_ready func and only 2 calls to "call" func.
It's happen becouse in poll_ready we have following code
This is expected behavior. What are you doing with the requests that are "over limit"? Rejecting them immediately, or just collecting them to pass on once allowed?
If the latter, you can combine with tower-buffer to do exactly that.
When i'm wrapping my object with RateLimit object and with 1 times per 1 second limit, and then call it 6 times - i've got 6 calls to poll_ready func and only 2 calls to "call" func.
It's happen becouse in poll_ready we have following code
State::Limited(ref mut sleep) => { ready!(Pin::new(sleep).poll(cx)); }
and in this case "sleep" knows only context of the "last" query called for poll_ready, so 4 other queries won't be woked up (as i suppose).
The text was updated successfully, but these errors were encountered: