[erlang-questions] ex 8.11 in Programming Erlang

Mazen Harake mazen.harake@REDACTED
Sun Aug 16 07:50:08 CEST 2009


Yes that is correct; he means with the same atom.

/Mazen

Xingzhi Pan wrote:
> Hi,
>
> I'm working through Joe's Programming Erlang and saw these nice exercises.
> I've read previous solution at
> http://erlang.org/pipermail/erlang-questions/2007-September/029405.html but
> I have a question regarding the exercise itself.
>
> For your convenience the problem is:
>
> Write a function start(AnAtom, Fun) to register AnAtom as spawn(Fun). Make
> sure your program works correctly in the case when two parallel processes
> simultaneously evaluate start/2. In this case, you must guarantee that one
> of these processes succeeds and the other fails.
>
> So when the author wrote "simultaneously evaluates start/2", he also means
> "with the same AnAtom", right? 'Cause if not, it would make all those
> discussions baseless...
>
> Am I splitting hair?
>
> Thanks in advance.
>
> Pan, Xingzhi
>
>   



More information about the erlang-questions mailing list