Method WaitUntilStoppedAsync
| Improve this Doc View SourceWaitUntilStoppedAsync(CancellationToken?)
Returns a task that completes when this shard is stopped either normally or from an error.
Declaration
public Task WaitUntilStoppedAsync(CancellationToken? cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken? | cancellationToken | A token to cancel the wait. Will not close the shard on cancellation. |
Returns
| Type | Description |
|---|---|
| Task |
Exceptions
| Type | Condition |
|---|---|
| OperationCanceledException | Thrown if the passed cancellation token is cancelled. |