RateLimiter.AcquireAsyncCore(Int32, CancellationToken) Method
Definition
Important
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.
Method that RateLimiter implementations implement for AcquireAsync(Int32, CancellationToken).
protected abstract System.Threading.Tasks.ValueTask<System.Threading.RateLimiting.RateLimitLease> AcquireAsyncCore (int permitCount, System.Threading.CancellationToken cancellationToken);
abstract member AcquireAsyncCore : int * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Threading.RateLimiting.RateLimitLease>
Protected MustOverride Function AcquireAsyncCore (permitCount As Integer, cancellationToken As CancellationToken) As ValueTask(Of RateLimitLease)
Parameters
- permitCount
- Int32
Number of permits to try and acquire.
- cancellationToken
- CancellationToken
Optional token to allow canceling a queued request for permits.
Returns
A task that completes when the requested permits are acquired or when the requested permits are denied.