Skip to content

EnqueueRequestAsync Method ​

Definition ​

  • Namespace: JASE
  • Assembly: JASE.Concurrency.dll

Overloads ​

NameDescription
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 ​

NameDescription
cancellationTokenA 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 ​

NameDescription
cancellationTokenA token that can be used to cancel the wait.
timeoutMaximum time to wait. Must be greater than zero.

Returns ​

A task that completes when the request has been enqueued.