-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Use opaque closure for tasks #44222
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
Use opaque closure for tasks #44222
Conversation
Hmm... I get another error in
|
I just noticed Lines 725 to 727 in 7b39515
which makes it impossible to precompile Revise with this branch presumably because Revise precompiles some functions containing So, maybe we should only do the fix for the sysimage and postpone what I actually wanted to do in this PR. |
|
|
Right, I don't see why we need opaque closures to make |
Hmm... yeah, I don't remember why I didn't think about it. |
To make
fetch(::Task)
inferrable and also to optimize tasks better in general, it might be a good idea to use opaque closures with@spawn
etc. Now we are at a very early phase of 1.9-DEV, it might be a good idea to start using opaque closures now and let possible bugs surface before the next feature freeze. (But this PR does not makefetch(::Task)
inferrable on its own.)Actually, it looks like we need to fix at least one bug before even start using opaque closures in
@spawn
since codegen for opaque closures does not work with sysimage yet. I get an error likeThis is due to the lookup of the global
clone->getNamedValue(global)
injulia/src/aotcompile.cpp
Lines 366 to 373 in 7b39515
failed and returned a NULL.
I tried to fix this in d30e90a but I'm not sure if this is the right way to do it. I just simply tried to treat the symptom I found with rr.
@Keno Are opaque closures ready for this? Also, is my patch d30e90a OK?