[erlang-questions] Associating contextual info with monitors
Andras Georgy Bekes
Mon Feb 18 12:44:26 CET 2008
> For instances where the processes being spawned aren't gen_* servers,
> I would most likely spawn a wrapper process which in turn spawn_links
> the real child process, then blocks forever waiting to receive the
> EXIT for that process (the cleanup code is triggered upon receipt of
> the EXIT, then the wrapper process itself terminates).
So you write something like this:
Isn't it simpler to write
This doesn't use the extra process, and anyways, isn't this the purpose
of try-catch? You can even omit the catch section, it is not mandatory.
More information about the erlang-questions