-
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
How to use RateLimiter to call api? #16
Comments
You do not need to wait for the call completion:
|
Thanks for the response. But this does not seem to solve the problem. If you happen to execute this code, the system only makes a single call and waits until that finishes and starts next call. `
` |
Note that in my example, I was using a signature with a void return and not a Task, this is key here not to wait to the completion of the task.
|
Oh you are right. I didn't notice, that solved the issue. Thanks! |
The example does not fit well with the actual API calling. In the scenario where API limits 5 calls per second but itself responds back in 3-4 seconds the example code just performs one call per second since its waiting for previous call to finish. How can I remedy it.
Example code
`
The text was updated successfully, but these errors were encountered: