Queue of async tasks with throttling which supports muti-threading
问题 I need to implement a library to request vk.com API. The problem is that API supports only 3 requests per second. I would like to have API asynchronous. Important: API should support safe accessing from multiple threads. My idea is implement some class called throttler which allow no more than 3 request/second and delay other request. The interface is next: public interface IThrottler : IDisposable { Task<TResult> Throttle<TResult>(Func<Task<TResult>> task); } The usage is like var audio =