Open ma1ko opened 6 years ago
Yes. This is already implemented. .try_wait()
and .try_wait_for()
. Looks like the doc coverage isn't there for these. Will leave this open to address that.
Thanks! This is exactly what I need. I was just going through the documantation and couldn't find anything
Awesome! I'll fix-up the documentation. Thanks for opening this!
On Sun, Apr 15, 2018, 10:18 AM ma1ko notifications@github.com wrote:
Thanks! This is exactly what I need. I was just going through the documantation and couldn't find anything
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/brayniac/ratelimit/issues/30#issuecomment-381422563, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ_jlyiDZDNi-udZ2GWtj0IGmhr83awOks5to4DLgaJpZM4TVX9n .
Currently the only way get a tocken is calling
wait()
. I need a non-blocking version (maybeget()
) that tries to get a token, but if none is available the method returns with an error instead of waiting The use-case here is aborting operations if they are over their limit instead of waiting for new tokens.Is this possible to implement?