isCancelled
A Boolean value that indicates whether the task should stop executing.
Declaration
static var isCancelled: Bool { get }Discussion
After the value of this property becomes true, it remains true indefinitely. There is no way to uncancel a task.
Interaction with Task Cancellation Shields
Cancellation may be suppressed by an active task cancellation shield (withTaskCancellationShield(operation:)), which may cause isCancelled to return false even though the task has been cancelled externally.