isEmpty
A Boolean value that indicates whether the group has any remaining tasks.
- iOS
- 13.0+
- macOS
- 10.15+
- tvOS
- 13.0+
- watchOS
- 6.0+
var isEmpty: Bool { get }
Returns
true
if the group has no pending tasks; otherwise false
.
At the start of the body of a withThrowingTaskGroup(of: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.