JuliaLang / Distributed.jl

Create and control multiple Julia processes remotely for distributed computing. Ships as a Julia stdlib.
https://docs.julialang.org/en/v1/stdlib/Distributed/
MIT License
23 stars 9 forks source link

propagate Ctrl-C on a `put!`, `take!`, etc to the remote process #28

Open amitmurthy opened 8 years ago

amitmurthy commented 8 years ago
julia> rr=RemoteRef(2)
RemoteRef(2,1,1)

julia> take!(rr)
^CERROR: InterruptException:
 in process_events at ./stream.jl:642
 in wait at ./task.jl:302
 in wait at ./task.jl:228
 in wait_full at ./multi.jl:631
 in remotecall_fetch at multi.jl:731
 in call_on_owner at ./multi.jl:778
 in take! at ./multi.jl:811

julia> put!(rr, 1)
RemoteRef(2,1,1)

julia> take!(rr)

The second take! does not get the data from the put! since Ctrl-C does not actually kill the spawned first take! task on the remote worker.

Interrupting the parallel API calls should interrupt the waiting tasks on the remote process too.