[Accepted with modifications and focused re-review] SE-0461: Run nonisolated async functions on the caller's actor by default

Hi all,

The review of SE-0461: Run nonisolated async functions on the caller's actor by default concluded on March 2, 2025.

The language steering group has decided that the proposal should be accepted with modifications, with the exception of a focused re-review on the transitional spelling originally proposed as @execution(caller).

Feedback overall was positive with respect to both the proposed change in the default behavior of nonisolated async functions so that they will run on the caller's actor, as well as the overall way in which it was proposed to stage that change into upcoming versions of Swift. In response to review feedback, the language steering group has decided to adopt the proposal with the following revisions, which have been incorporated into the revised text:

  • Region isolation rules for nonisolated async functions that run on the caller's actor by default have been specified.

  • Because nonisolated async functions may now run on a specific actor at runtime, assumeIsolated and related APIs are now useful in such contexts; for that reason, the noasync availability restriction is removed from those APIs.

  • The unconditional warning about nonisolated async functions that don't explicitly specify either @execution(caller) or @execution(concurrent) in the absence of a feature flag has been removed: IDE features and migration tooling will help users interpret and express their intentions without requiring pervasive source code editing to silence this diagnostic.

  • The proposed spelling @execution(concurrent) has been reverted back to @concurrent: while acknowledging concerns that it is not the only source of concurrency, the language steering group agreed with arguments that @concurrent communicates why a user would reach for this attribute, and we agreed that it would be best to avoid terminology that encourages thinking in terms of task executors for this behavior.

Having accepted the bulk of the proposal with these modifications, the language steering group finally considered feedback regarding the spelling of @execution(caller). We agreed that an exact symmetry between @execution(caller) and @execution(concurrent) isn't necessary, particularly since the former is meant to be a transitional explicit spelling for the now-accepted default behavior of nonisolated async functions. However, there was not a consensus spelling that emerged during the review period.

Therefore, the proposal authors have decided to put forward a revised transitional spelling, nonisolated(nonsending), as well as the rationale and alternatives for their choice. In a focused re-review to be launched shortly, we're asking for feedback on this aspect of the proposal.

Thank you, as always, to all participants in this review process for helping to make Swift a better language.

Xiaodi Wu

8 Likes