Distributed spawn-linking.

Michael McDaniel erlang@REDACTED
Mon Aug 8 17:18:49 CEST 2005


On Mon, Aug 08, 2005 at 05:51:42PM +0300, Alex Arnon wrote:
> Hi All,
> 
> A (newbie question):
> Consider a somewhat convoluted architecture: I have two processes, the
> Spawner and Overseer. The Spawner's role is to spawn processes, while
> the overseer would link to them and manage their operation (sending
> command messages and the like). My question is:
>   if the Spawner does this:
> 
>     Overseer ! {new, spawn(SomeNode, Behaviour, Args)}
> 
>   and the Overseer then does:
> 
>     receive
>         {new, Pid} ->
>             link(Pid),
>             Pid ! {i_see_you, self()}
>         ...
> 
> Is there any chance that the link would fail/message would get lost
> due to there not being a process yet? In other words, does spawn()
> wait for SomeNode to respond with an ACK before returning?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

googling "message passing acknowledge" shows ...

http://www.erlang.org/ml-archive/erlang-questions/200212/msg00284.html





More information about the erlang-questions mailing list