[erlang-questions] Re: Question about register/2

Ulf Wiger ulf.wiger@REDACTED
Wed Apr 6 14:44:39 CEST 2011


Any time you call a function, the input arguments are evaluated before the function is executed, so the spawn should *always* execute in this case.

This is characteristic of a language with eager (as opposed to lazy) evaluation.

BR,
Ulf W

On 6 Apr 2011, at 14:40, Arie van Wingerden wrote:

> Hi,
> 
> when I issue register(id, spawn aFun) and id already is associated with some process, the function fails.
> 
> What disturbs me is that the check of id already being taken for another pid, might take place *after* the spawn has been executed.
> Hence a "ghost" process is running.
> 
> Is this the way it works? And how is this mostly solved?
> 
> Regards,
>    Arie
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

Ulf Wiger, CTO, Erlang Solutions, Ltd.
http://erlang-solutions.com






More information about the erlang-questions mailing list