Skip to content
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

Ability to interrupt while true end #5

Open
fonsp opened this issue Sep 5, 2022 · 1 comment
Open

Ability to interrupt while true end #5

fonsp opened this issue Sep 5, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@fonsp
Copy link
Member

fonsp commented Sep 5, 2022

In the terminal, Ctrl+C will interrupt some code, like sleep(1000), but not number-crunching code like tight loops. For this, the Julia client has special code that checks for quickly repeating interrupt signals, which creates a "super interrupt":

Schermopname.2022-09-05.om.11.32.35.mov

In Pluto, we have the following code to repeat the Ctrl+C signal:

https://github.com/fonsp/Pluto.jl/blob/70a80786fe9f5c3fe1c6c1368eb937a7e0288305/src/evaluation/WorkspaceManager.jl#L615-L649

This sort-of works (not on Windows), but it will occasionally kill the entire Julia process.

Can you create an example of interrupting while true end using Malt.jl? Can you consistently repeat this multiple times in the same process? Maybe this can be included in the tests?

Maybe this could be included in Malt.jl API, like interrupt(worker; aggressive=true)?

@fonsp
Copy link
Member Author

fonsp commented Sep 5, 2022

Also see JuliaLang/julia#46635 about this behaviour on Julia 1.8

@fonsp fonsp added the enhancement New feature or request label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant