Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardSwiftstructured concurrency task treesSingle-choice MCQ

A task group is created with `withTaskGroup`. What does the structured concurrency model guarantee about the group body returning before all added child tasks have completed?

await withTaskGroup(of: Int.self) { group in group.addTask { await work(1) } group.addTask { await work(2) } return // body returns without draining results }