# \[Third Review\] SE-0526: withDeadline

**URL:** <https://forums.swift.org/t/third-review-se-0526-withdeadline/87787>\
**Category:** Proposal Reviews\
**Created:** [June 28, 2026, 5:22pm UTC](https://forums.swift.org/t/third-review-se-0526-withdeadline/87787 "2026-06-28T17:22:32Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![Philippe\_Hausler](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/philippe_hausler/32/22569_2.png) [@Philippe\_Hausler](https://forums.swift.org/u/Philippe_Hausler)\
**Post date:** [July 3, 2026, 5:48pm UTC](https://forums.swift.org/t/third-review-se-0526-withdeadline/87787/21 "2026-07-03T17:48:10Z")

</div>

Per the naming of the cancellation reasons; it seems to me that it boils down to the tension between the concept of "not cancelled and therefore has no reason" and the concept of "no reason given but still cancelled". Which that does lend a bit of credence to the idea of

> [@anreitersimon](#):
>
> I would propose `unspecified` or something similar.

That name does encapsulate the concept of no reason given but still cancelled. So I don't hate that as a solution, but it does leave the reason then optional and the nil case meaning not cancelled. So in practice, the very few folks who would need this would switch as:

```swift
switch Task.cancellationReason {
case . deadlineExpired:
  break // a deadline happened
case .unspecified:
  break // some other thing cancelled but not for a deadline reasoning
case .none:
  // it wasn't cancelled
}

// and the cancellation error switch
switch cancellationError.reason {
case . deadlineExpired:
  break // a deadline happened
case .unspecified:
  break // some other thing cancelled but not for a deadline reasoning
}

```

@John_McCall you were the one who voiced some opposition to the naming of `.taskCancelled`, does `.unspecified` suffice as well as the `.userRequested` suggestion? I feel like it might actually be slightly better. (but tbh it is splitting hairs at this point)

---

<div class="post-metadata">

**Author:** ![John\_McCall](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/john_mccall/32/1351_2.png) [@John\_McCall](https://forums.swift.org/u/John_McCall)\
**Post date:** [July 3, 2026, 5:52pm UTC](https://forums.swift.org/t/third-review-se-0526-withdeadline/87787/22 "2026-07-03T17:52:10Z")

</div>

I have no strong objection to `.unspecified`.

---

<div class="post-metadata">

**Author:** ![anreitersimon](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/anreitersimon/32/7269_2.png) [@anreitersimon](https://forums.swift.org/u/anreitersimon)\
**Post date:** [July 3, 2026, 7:11pm UTC](https://forums.swift.org/t/third-review-se-0526-withdeadline/87787/23 "2026-07-03T19:11:08Z")

</div>

I think i misunderstood a bit when proposing `unspecified`

I assumed this would be on CancellationError

But i think that would be a argument for Task.cancellationReason being a optional.

That way both could use the same type (CancellationError.reason == .notCancelled doesnt really make sense)

Also nil would match my intuitipn how "not cancelled" would be expressed

[Previous page](https://forums.swift.org/t/third-review-se-0526-withdeadline/87787.md?page=1)
