-
-
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
Can't interrupt on Windows #452
Comments
I talked with @pfitzseb and he pointed out that only supporting the "soft interrupt", i.e. schedule(running_task, InterruptException(); error=true) is already quite nice! And relatively easy to implement |
FWIW, Windows doesn't have the same notion of signals as Unix, so you literally cannot send a |
But the REPL can do it! It seems so close, yet so far 😪 |
That's the same process though. But then again, I don't really understand how all of this works either ;) |
Is there any hope of resolving this? When working with long-running code on windows this is extremely frustrating. |
Can we make a workaround? Like disabling the cell such that when I reload the cell is not executed? |
Hey @fonsp! Hope this message finds you well. I just ran into this same problem (for similar reasons to #1568), came upon this issue as a result, and figured I might be able to help produce a fix. It seems to me that, when you opened the issue, you had spent a decent amount of effort seeking the root cause. If any of that research has stuck with you, can you please share some of your findings? |
This needs (something like) JuliaLang/julia#49541. |
We almost fixed it! See JuliaPluto/Malt.jl#60 JuliaLang/julia#49541 will be useful for handling interrupts more cleanly, eg the Ctrl+C signal to shut down Pluto, and we can make sure that interrupting the notebook will never interrupt Pluto/Malt internals. But the interrupt-on-windows issue is separate :) |
And @ron-wolf thanks so much for taking a look! This is really beyond my skillset and I feel crazy lucky that JuliaPluto/Malt.jl#60 worked 😅 I would love to get your review on JuliaPluto/Malt.jl#60! Finishing JuliaLang/julia#49541 would also be useful for Pluto (including experimentation on how to best use the new API inside Pluto and Malt). Another topic is the "hard interrupt" that you get by pressing Ctrl+C 5 times within one second. Pluto does this automatically when the first interrupt did not work, but it is a bit unstable. (Hence we are scared to add tests for it.) The main issue is that it sometimes keeps going for too long which kills the process, because we don't have a good way to check if the interrupt worked. Code is here: https://github.com/fonsp/Pluto.jl/blob/v0.19.28/src/evaluation/WorkspaceManager.jl#L656-L690 I want to move this code from Pluto to Any help here would be super appreciated! |
This is because
Distributed.interrupt
always kills the process on Windows. I don't know why, I have spent some days on this interrupt stuff but it is beyond me. Maybe someone with experience in process signals can have a look?Another solution is to not use Distributed anymore, #300
The text was updated successfully, but these errors were encountered: