Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a limiter type that users interact with to determine if an operation can proceed.
public abstract class RateLimiter : IAsyncDisposable, IDisposable
type RateLimiter = class interface IAsyncDisposable interface IDisposable
Public MustInherit Class RateLimiter Implements IAsyncDisposable, IDisposable
Specifies how long the RateLimiter has had all permits available. Used by RateLimiter managers that may want to clean up unused RateLimiters.
Wait until the requested permits are available or permits can no longer be acquired.
Method that RateLimiter implementations implement for AcquireAsync(Int32, CancellationToken).
Fast synchronous attempt to acquire permits.
Method that RateLimiter implementations implement for AttemptAcquire(Int32).
Disposes the RateLimiter. This completes any queued acquires with a failed lease.
Dispose method for implementations to write.
Disposes the RateLimiter asynchronously.
DisposeAsync method for implementations to write.
Gets a snapshot of the RateLimiter statistics if available.