how "synchronous" is exit?
Tue May 30 08:58:22 CEST 2006
Damien Katz wrote:
> When issuing an exit(Pid, kill) to a another process,
> is there any guarantee that the process, and all its
> linked child processes, are dead before continuing?
No. Signals (exit/2 sends a signal) are asynchronous, just
like messages. In fact, messages are a special case of signals.
> If not, can anyone tell me a good way to wait on a
> process tree to die before continuing an action?
Either using old-school bidirectional process links and
setting the trap_exit process flag in the watching process,
or the more modern, unidirectional process monitors. See
(sections 10.6-10.8) for details.
More information about the erlang-questions