# SE-0304 (2nd review): Structured Concurrency

**URL:** <https://forums.swift.org/t/se-0304-2nd-review-structured-concurrency/47217>\
**Category:** Proposal Reviews\
**Created:** [April 7, 2021, 1:43am UTC](https://forums.swift.org/t/se-0304-2nd-review-structured-concurrency/47217 "2021-04-07T01:43:30Z")\
**Posts on this page:** 1\
**Showing post:** 73

<div class="post-metadata">

**Author:** ![Chris\_Lattner3](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/chris_lattner3/32/348_2.png) [@Chris\_Lattner3](https://forums.swift.org/u/Chris_Lattner3)\
**Post date:** [April 17, 2021, 5:56pm UTC](https://forums.swift.org/t/se-0304-2nd-review-structured-concurrency/47217/73 "2021-04-17T17:56:59Z")

</div>

Some quick feedback on the proposal, I apologize for being after the official review cycle:

- I love the improvements from v1 of the proposal. Moving things out of Task is much more clear.
- I agree with other comments that the priority names should be generalized, even if they remain a small number of integers. [This proposal](https://forums.swift.org/t/se-0304-2nd-review-structured-concurrency/47217/51) seems reasonable to me.
- I think that standardizing around the term `spawn` is a good way to go, but I'd recommend going further and pulling it into the detatch method. Instead of:

```swift
let dinnerHandle = detach {
  try await makeDinner()
}

```

I think it would be more fluent and would avoid introducing another top-level verb if we used:

```swift
let dinnerHandle = spawnDetached {
  try await makeDinner()
}

```

It seems ok to make the unstructured concurrency API more verbose since we prefer structured concurrency. This also maintains alignment around the `spawn` verb. Another alternative is `detatchTask`, but I think that aligning with spawn is a better way to go. You could go really crazy and use `spawnDetatchedTask` I suppose.

- With the introduction of effectful properties, should `get()` in `let dinner = try await dinnerHandle.get()` be an async get-only property, e.g. `let dinner = try await dinnerHandle.value`? The corresponding `getResult()` would just be `.result`. This aligns with the general cocoa naming convention which doesn't like "get" methods.

- On `withTaskCancellationHandler` I agree that putting the cancelation handler second and using something like `onCancel` seems most consistent with other frameworks and with `do/catch` syntax.

Overall, this is really great work, I'm excited to see it coming into Swift!

-Chris

---

_[View the full topic](https://forums.swift.org/t/se-0304-2nd-review-structured-concurrency/47217)._
