| ClusterLeaveAsync Method (CancellationToken) |
Causes the CURRENT node, i.e. the one calling this function, to leave the cluster.
Once the returned
Task completes in completed or cancelled state, it means that the member has successfully been removed
from the cluster or cancellation token cancelled the task.
Namespace:
Akka.Cluster
Assembly:
Akka.Cluster (in Akka.Cluster.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public Task LeaveAsync(
CancellationToken cancellationToken
)
member LeaveAsync :
cancellationToken : CancellationToken -> Task
Parameters
- cancellationToken
- Type: System.ThreadingCancellationToken
The cancellation token to cancel awaiting.
Return Value
Type:
TaskA
Task that will return upon the current node being removed from the cluster, or if await was cancelled.
Remarks
The cancellation token doesn't cancel leave from the cluster, it only lets to give up on awaiting (by timeout for example).
See Also