Skip to content

Too easy to accidentally catch InterruptException()? #4037

Open
@simonster

Description

@simonster

Because an InterruptException() is just a normal exception, it's easy to write code that accidentally catches it. In other words:

julia> @everywhere begin
        g() = for i = 1:10000 rand() end
        f(x) = while true
            try
                g()
            catch e
                println("error, continuing")
            end
        end
    end
julia> pmap(f, [1])

leads to a parallel job that cannot be interrupted using interrupt(), continues to run after Julia exits, and can only be stopped by killing julia-release-basic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    REPLJulia's REPL (Read Eval Print Loop)speculativeWhether the change will be implemented is speculative

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions