-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Wait method #12
Comments
Helllo @gioccher , thanks for the suggestion, I will need sometime to evaualate it and give you some feedback. |
Tnhiking of your use case and your implementation, I thnik that implementing an GetAwaiter on TimeLimiter (maybe as an extension method ) would provide the same usability and be more robust. |
That approach is definitely more elegant than the Wait extension method I've been using. I've pushed a couple of commits that implement that |
TimeLimiter are now awaitable. |
RateLimiter requires to package the rate limited code into a method. This can get awkward very quickly if the code that needs to be rate limited contains other code that needs to be rate limited, and so following the flow of the program becomes a bit difficult.
As a result, I almost always end up defining and using the following Wait extension methods, to make RateLimiter look more like other synchronization classes (SemaphoreSlim, Monitor, WaitHandle) and avoid refactoring the code into a chain of methods.
I thought this would be beneficial to other users, and was wondering if you would incorporate something like this in the project.
I'm unsure about the contribution policy, so I'm asking here instead of just creating a pull request.
The text was updated successfully, but these errors were encountered: