Appearance
EnqueueRequestAsync Method
Definition
- Namespace:
JASE - Assembly:
JASE.Concurrency.dll
Overloads
| Name | Description |
|---|---|
ValueTask EnqueueRequestAsync(CancellationToken cancellationToken = null) | Enqueues a new request, asynchronously waiting until the number of requests is less than the specified maximum. |
ValueTask EnqueueRequestAsync(TimeSpan timeout, CancellationToken cancellationToken = null) | Enqueues a new request, asynchronously waiting until the number of requests is less than the specified maximum or until timeout elapses. |
ValueTask EnqueueRequestAsync(CancellationToken cancellationToken = null)
csharp
ValueTask EnqueueRequestAsync(CancellationToken cancellationToken = null)Enqueues a new request, asynchronously waiting until the number of requests is less than the specified maximum.
Parameters
| Name | Description |
|---|---|
cancellationToken | A token that can be used to cancel the wait. |
Returns
A task that completes when the request has been enqueued.
ValueTask EnqueueRequestAsync(TimeSpan timeout, CancellationToken cancellationToken = null)
csharp
ValueTask EnqueueRequestAsync(TimeSpan timeout, CancellationToken cancellationToken = null)Enqueues a new request, asynchronously waiting until the number of requests is less than the specified maximum or until timeout elapses.
Parameters
| Name | Description |
|---|---|
cancellationToken | A token that can be used to cancel the wait. |
timeout | Maximum time to wait. Must be greater than zero. |
Returns
A task that completes when the request has been enqueued.