Skip to content

[region-isolation] Change semantics of function_extract_isolation from AssertingIfNonSendable -> Require. #72368

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

Conversation

gottesmm
Copy link
Contributor

The reason why I am doing this is that:

  1. function_extract_isolation can take as a parameter a non-Sendable function today in SIL so in such a case, we crash.
  2. It returns an Optional which always must be Sendable.

So it makes sense for it to just require that its non-Sendable parameter not be transferred at that point.

…m AssertingIfNonSendable -> Require.

The reason why I am doing this is that:

1. function_extract_isolation can take as a parameter a non-Sendable function
today in SIL so in such a case, we crash.
2. It returns an Optional<any Actor> which always must be Sendable.

So it makes sense for it to just require that its non-Sendable parameter not be
transferred at that point.
@gottesmm gottesmm requested a review from ktoso as a code owner March 16, 2024 00:30
@gottesmm gottesmm enabled auto-merge March 16, 2024 00:30
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm gottesmm merged commit 683e94f into swiftlang:main Mar 16, 2024
@gottesmm gottesmm deleted the pr-14b84426e480f5b5049c09df01c9445308dd19c5 branch March 16, 2024 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant