-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Run parallel execution paths in parallel #4
Comments
Would this make your notebook faster/more responsive? If a cell is running, then the CPU is busy anyways, and other cells will be stalled. It would give a speedup if it would use multiple CPU cores, but the only way to do so in Julia 1.0 is with |
Is this issue closed because it's resolved? |
We gave it this label: |
Just wanted to ask about the possibility of parallel evaluation of non-dependent cells and found this issue. I think this would be really cool. When Julia v1.6 will (hopefully) become the next LTS version of Julia, this should become very feasible, right (I assume Pluto aims support Julia versions down to the last LTS)? One could basically spawn a Julia task (multithreaded) for each cell as soon as all the dependencies of that cell are computed, and let the Julia scheduler worry about the rest. I guess it would need to be an optional feature, not all users will write thread-safe code. |
Yes this is true, but I think the current status quo is already dangerous for users that are writing code that mutates state between cells anyways because it's unpredictable which cell will get run first. I'm not sure that cell-parallelism would practically change that situation all that much. However, I can definitely see why it should be opt-in if it exists. Regarding supporting julia versions older than 1.3, I think the right thing to do would just be to define macro spawn(ex)
@static if VERSION ≤ v"1.3"
esc(ex)
else
esc(:($Threads.@spawn $ex))
end
end and then use this |
Are there any notebooks out there that showcase how to use state-mutating code in a safe way? I always make sure that a cell only mutates objects that were created in that cell, and I assumed that was the only reasonable way to go about it. EDIT: I suppose shared-global-resource access might be more problematic than plain Julia structure mutation... |
Related and also nice: ability to execute second block if it does not depend on any running blocks.
The text was updated successfully, but these errors were encountered: