Skip to content

[Diagnostics] Rename the note file to match the `NonisolatedNonsendin… #81413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/Concurrency/nonisolated_inherits_isolation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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`.
2 changes: 1 addition & 1 deletion userdocs/diagnostics/sending-risks-data-race.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.