---
title: isEmpty
framework: swift
role: symbol
role_heading: Instance Property
path: swift/discardingtaskgroup/isempty
---

# isEmpty

A Boolean value that indicates whether the group has any remaining tasks.

## Declaration

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

## Return Value

Return Value true if the group has no pending tasks; otherwise false.

## Discussion

Discussion At the start of the body of a withDiscardingTaskGroup(returning:body:) call, the task group is always empty. It’s guaranteed to be empty when returning from that body because a task group waits for all child tasks to complete before returning.
