# SE-0304 (3rd review): Structured Concurrency

**URL:** <https://forums.swift.org/t/se-0304-3rd-review-structured-concurrency/48847>\
**Category:** Proposal Reviews\
**Created:** [May 24, 2021, 10:52pm UTC](https://forums.swift.org/t/se-0304-3rd-review-structured-concurrency/48847 "2021-05-24T22:52:14Z")\
**Posts on this page:** 4\
**Page:** 3

<div class="post-metadata">

**Author:** ![Lantua](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lantua/32/8868_2.png) [@Lantua](https://forums.swift.org/u/Lantua)\
**Post date:** [June 14, 2021, 7:29am UTC](https://forums.swift.org/t/se-0304-3rd-review-structured-concurrency/48847/41 "2021-06-14T07:29:50Z")

</div>

As a meta-review, I really appreciate the detailed change-log. It really helps catching up to the current state of the proposal, especially if you got off midway somewhere.

---

<div class="post-metadata">

**Author:** ![Lantua](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/lantua/32/8868_2.png) [@Lantua](https://forums.swift.org/u/Lantua)\
**Post date:** [June 14, 2021, 9:19am UTC](https://forums.swift.org/t/se-0304-3rd-review-structured-concurrency/48847/42 "2021-06-14T09:19:54Z")

</div>

I I've been brooding over this for a while, and I still think that `TaskGroup` should cancels all of it's child tasks at the end of the `body` regardless of how it finishes (throwing vs non-throwing).

Firstly, note that we can override the default behaviour by calling `group.cancellAll()` or `while true { await group.next() }`, so it's more of the preference and has no impact on the expressibility.

There are a few reasons I prefer cancellation for all exits, even if the `body` doesn't throw.

- It makes the system much easier to explain (unused child tasks are cancelled).

- It would help the task group finishes earlier if the child tasks are cooperative, which is roughy the point of the cancellation.

- Furthermore, I believe it's more common for unused child tasks to be easily discardable and has no side effect.

---

<div class="post-metadata">

**Author:** ![ben-cohen](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ben-cohen/32/296_2.png) [@ben-cohen](https://forums.swift.org/u/ben-cohen)\
**Post date:** [July 7, 2021, 9:53pm UTC](https://forums.swift.org/t/se-0304-3rd-review-structured-concurrency/48847/43 "2021-07-07T21:53:53Z")

</div>

# Review Continuation

This proposal has been revised and a [fourth review](https://forums.swift.org/t/se-0304-4th-review-structured-concurrency/50281) has been initiated.

---

<div class="post-metadata">

**Author:** ![ben-cohen](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/ben-cohen/32/296_2.png) [@ben-cohen](https://forums.swift.org/u/ben-cohen)\
**Post date:** [July 7, 2021, 9:54pm UTC](https://forums.swift.org/t/se-0304-3rd-review-structured-concurrency/48847/44 "2021-07-07T21:54:10Z")

</div>

Closed on July 7, 2021, 9:54pm UTC



[Previous page](https://forums.swift.org/t/se-0304-3rd-review-structured-concurrency/48847.md?page=2)
