Skip to content

Generalize ActorIsolation to capture arbitrary isolated parameters #60799

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
merged 2 commits into from
Aug 26, 2022

Conversation

DougGregor
Copy link
Member

Generalize the central ActorIsolation type to describe isolation to an isolated parameter that is not self. This allows us to properly express the isolation of such declarations, replacing some bespoke hacks with the same central model used for self-isolated and global-actor-isolated declarations. It also subsumes ImplicitActorHopTarget, so remove that type and replace all uses of it with ActorIsolation.

A function can be actor instance-isolated to one of its parameters.
Make sure that this is reflected in ActorIsolation, so such a function
doesn't get a different actor isolation.
The generalized ActorIsolation is enough to represent everything that
ImplicitActorHopTarget can do, and we were mapping between the two way
too often, so collapse them.
@DougGregor
Copy link
Member Author

@swift-ci please smoke test

@DougGregor DougGregor merged commit 0db7246 into swiftlang:main Aug 26, 2022
@DougGregor DougGregor deleted the generalize-actor-isolation branch August 26, 2022 20:03
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