Appearance
ConfigureAsync Method
Definition
- Namespace:
JASE - Assembly:
JASE.Concurrency.dll
Overloads
| Name | Description |
|---|---|
ValueTask ConfigureAsync(int maxRequests, TimeSpan timeSpan, CancellationToken cancellationToken = null) | Updates the admission limits. When maxRequests or timeSpan is reduced, admissions are paused until the active window complies with the new limits. |
ValueTask ConfigureAsync(TimeSpan timeout, int maxRequests, TimeSpan timeSpan, CancellationToken cancellationToken = null) | Updates the admission limits, waiting at most timeout when a drain is required. |
ValueTask ConfigureAsync(int maxRequests, TimeSpan timeSpan, CancellationToken cancellationToken = null)
csharp
ValueTask ConfigureAsync(int maxRequests, TimeSpan timeSpan, CancellationToken cancellationToken = null)Updates the admission limits. When maxRequests or timeSpan is reduced, admissions are paused until the active window complies with the new limits.
Parameters
| Name | Description |
|---|---|
cancellationToken | A token that can be used to cancel the wait. |
maxRequests | The maximum number of requests allowed within the specified time span. |
timeSpan | The time span during which the maximum number of requests is allowed. |
Returns
A task that completes when the new limits are in effect and any required drain has finished.
ValueTask ConfigureAsync(TimeSpan timeout, int maxRequests, TimeSpan timeSpan, CancellationToken cancellationToken = null)
csharp
ValueTask ConfigureAsync(TimeSpan timeout, int maxRequests, TimeSpan timeSpan, CancellationToken cancellationToken = null)Updates the admission limits, waiting at most timeout when a drain is required.
Parameters
| Name | Description |
|---|---|
cancellationToken | A token that can be used to cancel the wait. |
maxRequests | The maximum number of requests allowed within the specified time span. |
timeSpan | The time span during which the maximum number of requests is allowed. |
timeout | Maximum time to wait for drain. Must be greater than zero. |
Returns
A task that completes when the new limits are in effect and any required drain has finished.