[Diagnostics] Replace last references to AsyncCallerExecution with NonisolatedNonsendingByDefault

This commit is contained in:
Pavel Yaskevich
2025-05-09 13:02:58 -07:00
parent fbaf7ce017
commit 0bcbde4940
3 changed files with 5 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
// REQUIRES: concurrency
// REQUIRES: swift_feature_NonisolatedNonsendingByDefault
// This test checks and validates that when AsyncCallerExecution is enabled, we emit the
// This test checks and validates that when NonisolatedNonsendingByDefault is enabled, we emit the
// appropriate diagnostics. It also runs with the mode off so we can validate
// and compare locally against the normal errors.

View File

@@ -1,4 +1,4 @@
# `AsyncCallerExecution`
# `NonisolatedNonsendingByDefault`
This feature changes the behavior of nonisolated async
functions to run on the actor to which the caller is isolated (if any) by
@@ -9,7 +9,7 @@ This feature was proposed in [SE-0461](https://github.com/swiftlang/swift-evolut
* The `@concurrent` attribute specifies that a function must always
switch off of an actor to run.
This is the default behavior without `AsyncCallerExecution`.
This is the default behavior without `NonisolatedNonsendingByDefault`.
* The `nonisolated(nonsending)` modifier specifies that a function must always
run on the caller's actor.
This is the default behavior with `AsyncCallerExecution`.
This is the default behavior with `NonisolatedNonsendingByDefault`.

View File

@@ -49,4 +49,4 @@ func onMainActor(person: Person) async {
This eliminates the risk of data-races because `printNameConcurrently` continues to run on the main actor, so all access to `person` is serialized.
You can also enable the `AsyncCallerExecution` upcoming feature to make `nonisolated(nonsending)` the default for async functions on non-`Sendable` types.
You can also enable the `NonisolatedNonsendingByDefault` upcoming feature to make `nonisolated(nonsending)` the default for async functions on non-`Sendable` types.