---
title: isCancelled
framework: swift
role: symbol
role_heading: Instance Property
path: swift/throwingdiscardingtaskgroup/iscancelled
---

# isCancelled

A Boolean value that indicates whether the group was canceled.

## Declaration

```swift
var isCancelled: Bool { get }
```

## Discussion

Discussion To cancel a group, call the ThrowingDiscardingTaskGroup.cancelAll() method. If the task that’s currently running this group is canceled, the group is also implicitly canceled, which is also reflected in this property’s value. 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. note: withTaskCancellationShield(operation:)
