none
Throttle and and async Task method RRS feed

  • Question

  • I am using a DLL, which exposes me methods that should must be used with await. 

    I wrapped it with my own method  of type :async Task<bool>.

    I call this using Parallel.ForEach.

    how can I control the number of call's, where my target is to get for example X call to the above method,

    in period of 1 second I want to spread it over this frame of time equally+- , and not like at the moment I see 100 calls in

    11 milliseconds which is too fast (I limited the MaxDegreeOfParallelism but I look for more robust solution.

    Wednesday, May 22, 2019 6:02 AM

All replies