-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Progress towards storing task/executor state in thread-local storage #36079
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
Conversation
@swift-ci Please test |
Build failed |
Build failed |
NFC except that I added swift_errorRetain and swift_errorRelease functions on non-ObjC targets so that we have consistent functions to call in the runtime. I have not changed everywhere in the runtime to use these, nor have I changed the compiler to call them.
First, just call an async -> T function instead of forcing the caller to piece together which case we're in and perform its own copy. This ensures that the task is actually kept alive properly. Second, now that we no longer implicitly depend on the waiting tasks being run synchronously, go ahead and schedule them to run on the global executor. This solves some problems which were blocking the work on TLS-ifying the task/executor state.
r11 is the linker scratch register, so we need to make sure that we don't end up in the linker when making cross-library direct async calls. Since there are currently only a few special symbols that we do that for, we can achieve this by disabling lazy binding for those symbols specifically.
@swift-ci Please test |
fd43618
to
fd96f41
Compare
Build failed |
Build failed |
I think that this change may have further regressed the Windows CI: https://ci-external.swift.org/job/oss-swift-windows-x86_64-vs2019/4429/console @shahmishal - seems that the CI didn't trigger here? |
trackingInfo.leave(); | ||
} | ||
|
||
void swift::runJobInExecutorContext(Job *job, ExecutorRef executor) { |
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.
Ok, awesome 👍
No description provided.