-
Notifications
You must be signed in to change notification settings - Fork 2
Description
First of all, congrats on the library, finally a library which address fairness ;)
I have reviewed the documentation and I miss a very helpful -and needed in my specific case- feature: being able to perform a blocking ask.
If I'm not wrong, if there is no quota left, the ask function inmediately returns an error with the root cause.
Instead of returning and error, I propose an additional option to the ask function to block until there is another available slot for the requester.
In another rate limiting libraries, an additional setting allows to set a limit on how many simultaneous blocked requests can be waiting, and default to deny requests if that limit is reached and a new request is made.
At the end this behaviour is equivalent to allow reserving slots in advance.