[erlang-questions] Question about receive
Ulf Wiger
ulf@REDACTED
Tue Jun 26 22:37:57 CEST 2007
There are two common ways to do it:
make_ref() returns a unique reference (of type reference)
erlang:monitor(process, P) also returns a reference, and starts a
monitor on process P. If P dies, the monitoring process will receive a
message, {'DOWN', Reference, process, P, Reason}. Very handy, and
used, e.g. in gen_server:call() to match a reply to the corresponding
request, and monitor the server at the same time.
BR,
Ulf W
2007/6/26, Matej Kosik <kosik@REDACTED>:
> Hi,
>
> Does Erlang provide some convenient way of generating unique tags? (objects that cannot have duplicates). With that, I would be able to ensure reception of messages from a one chosen process (if there is no better way to do it).
>
> Btw. Thank you for your answers. (your previous answers did help me).
> --
> Matej Kosik
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>
More information about the erlang-questions
mailing list