exit in fun running via timer:apply_interval/4
Tue Jun 7 13:11:59 CEST 2005
On 2005-06-03 20:53, Reto Kramer wrote:
> I'm looking for the best (elegant) way to make sure that if there's an
> exit in the Mod:Fun that I run via timer:apply_interval/4, the "parent"
> process (the one that scheduled the timer) will receive the exit
> message, so I can programmatically react to it (and e.g. shutdown my
> I'm sure someone out there has an elegant solution.
i do not have a solution. instead i have a follow-up question:
what does the following from the man page of the timer module mean?
An interval timer, i.e. a timer created by evaluating any of
tions apply_interval/4, send_interval/3, and send_interval/2, is
to the process towards which the timer performs its task.
i interpreted it to mean that the process that called
timer:apply_interval will be linked to the (temporary) process doing the
module:function() supplied as argument to apply_interval/4.
this is not the case, so what does it really mean?
who is linked, and to whom?
bengt, who has included a little test module to play with when
investigating this problem.
timer:apply_interval(1000, interval, crashing, ),
after 500 ->
More information about the erlang-questions