[Returned for revision] SE-0526: withDeadline

Hello, Swift community!

The review of SE-0526: withDeadline ran from April 6th though April 20th, 2026. The Language Steering Group has decided to return this proposal for revision on a few points. Namely, the Language Steering Group is interested in seeing the following points addressed:

  1. Naming: while the LSG agrees with the authors that the cooperative nature of this API is the correct primitive for Swift concurrency, we were sympathetic to the concern that the withDeadline name potentially suggests a stronger promise for what happens at deadline expiration than what this function actually does. We would like to see some more exploration of potential alternatives here.
  2. DeadlineError: the LSG understands the constraints which lead to the unconditional 'wrapping error' shape that was proposed, but is worried that the current Cause enum over-promises the information it can provide. The cases of this enum are operationFailed and deadlineExceeded, but it is entirely possible that the target operation experiences a 'true' failure which just happens to come after the deadline is exceeded—such a case would result in the 'cause' being misattributed. Additionally, the LSG notes that the current API shape makes deadline information unrecoverable in the case of a successful exit. We would like to see further exploration on how the 'deadline exceeded' case gets communicated which considers both of these points.
  3. Generic Clocks: there are various ergonomic difficulties presented by the decision to allow the use of generic Clocks in this API. The LSG considers the hoops one needs to jump through in order to recover a usable instant value from the Task.currentDeadline property as-proposed to be unacceptable and would like to see further work here. Additionally, the LSG feels that the deadline composition behavior—specifically, how deadline composition interacts with cross-clock deadlines—is not really workable in its current form.

Once the authors have addressed the above points of feedback we will bring the proposal back for another round of review.

Thank you to everyone who participated in this review!

Freddy Kellison-Linn
Review Manager

8 Likes