Skip to content
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 with synchronous method #33

Open
maithanhtan opened this issue Oct 20, 2021 · 0 comments
Open

How to use with synchronous method #33

maithanhtan opened this issue Oct 20, 2021 · 0 comments

Comments

@maithanhtan
Copy link

maithanhtan commented Oct 20, 2021

Hi Can someone share me how to use RateLimiter with synchronous method?

In the synchronous method I am using the way like that:

Logfile.Info("Start RateLimit");
Task.Run(async () =>
{
await timeConstraint;
}).Wait();
Logfile.Info("End RateLimit");

But it get deadlocked when calling this synchronous method from multiple thread

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant