Skip to content

DurableTaskContext.RequestTaskCancellation(string?)

RequestTaskCancellation(string?)

View source
protected internal void RequestTaskCancellation(string? reason)
Requests durable cancellation of the task which this context runs, carrying reason.

Parameters

reasonstring?
The reason which DurableTaskContext reports, or null for none. The first request determines the reason, so a host which replays a canceled task passes the reason it recorded with the task's cancellation.