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
20 stars 8 forks source link

Can we have `bind(::RemoteChannel, ::Process)`? #88

Open NHDaly opened 1 year ago

NHDaly commented 1 year ago

If you have one process waiting on a RemoteChannel that is supposed to be filled then closed by another process, but that process crashes before it's finished, the first process will hang forever.

It seems that what we want is to wait on the lifetime of the Process, and if the process exits early, to close the channel. And if the process exits non-normally, to throw an exception on the channel.

This is exactly what bind does, but there is no overload for RemoteChannels. Can we add one?

I think it could use wait(::Process) which already exists.

NHDaly commented 1 year ago

cc: @nickrobinson251