mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Diagnostics] Replace last references to AsyncCallerExecution with NonisolatedNonsendingByDefault
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
@@ -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`.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user