RateLimiter icon indicating copy to clipboard operation
RateLimiter copied to clipboard

How to use with synchronous method

Open maithanhtan opened this issue 3 years ago • 0 comments

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

maithanhtan avatar Oct 20 '21 04:10 maithanhtan