Skip to content

Instantly share code, notes, and snippets.

Created Jul 18, 2022
What would you like to do?
public abstract class RateLimiter : IAsyncDisposable, IDisposable
public abstract int GetAvailablePermits();
public abstract TimeSpan? IdleDuration { get; }
public RateLimitLease Acquire(int permitCount = 1);
public ValueTask<RateLimitLease> WaitAsync(int permitCount = 1, CancellationToken cancellationToken = default);
public void Dispose();
public ValueTask DisposeAsync();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment