[erlang-questions] Re: Question about register/2
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.
On 6 Apr 2011, at 14:40, Arie van Wingerden wrote:
> 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?
> erlang-questions mailing list
Ulf Wiger, CTO, Erlang Solutions, Ltd.
More information about the erlang-questions