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.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: Under hela 2024 kommer vi att fasa ut GitHub-problem som feedbackmekanism för innehåll och ersätta det med ett nytt feedbacksystem. Mer information finns i:Skicka och visa feedback för