Skip to content

IDurableTaskManager.CancelAsync(TaskId, string?, CancellationToken)

CancelAsync(TaskId, string?, CancellationToken)

abstract
View source
public abstract ValueTask CancelAsync(TaskId taskId, string? reason, CancellationToken cancellationToken = default(CancellationToken))
Durably requests cancellation of a task of this grain and its execution tree, carrying reason.

Parameters

taskIdTaskId
The task identifier.
reasonstring?
The reason which the task's DurableTaskContext reports, or null for none.
cancellationTokenCancellationToken
A token which abandons waiting for the request to commit.

Returns

An operation which completes once the cancellation request has committed and propagated.

Exceptions

Orleans.Durable.Tasks.DurableTaskNotFoundException
This grain doesn't retain the task.