-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[region-isolation] Require T in assumeIsolated<T> to be Sendable. #72763
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
[region-isolation] Require T in assumeIsolated<T> to be Sendable. #72763
Conversation
@swift-ci smoke test |
@tshortli is it safe to do what I am doing here if a function was back deployed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change itself LGTM though. I think it makes sense to prevent escaping non-sendable values out of an actor unsafely using the assumeIsolated { $0.state } trick 👍
dae432a
to
1c2f544
Compare
@swift-ci test |
@swift-ci smoke test linux platform |
I had to change the APIs to always be always emit into client instead of back deployable since silgen_name seems to interfere with @backDeployment. So I switched the implementation so that it instead uses an always emit into client thunk with the in source function name and a usableFromInline function that has the silgen_name. This ensures that we still appropriately export the same symbol as we did before, so it is ABI stable. This was approved as part of se-0414. rdar://122030520
1c2f544
to
cf93476
Compare
@swift-ci test |
@swift-ci smoke test |
@swift-ci smoke test |
@swift-ci smoke test Linux platform |
1 similar comment
@swift-ci smoke test Linux platform |
@swift-ci smoke test macOS platform |
I had to change the APIs to always be always emit into client instead of back deployable since silgen_name seems to interfere with @backDeployment. So I switched the implementation so that it instead uses an always emit into client thunk with the in source function name and a usableFromInline function that has the silgen_name. This ensures that we still appropriately export the same symbol as we did before, so it is ABI stable.
This was approved as part of se-0414.
rdar://122030520