[erlang-questions] Associating contextual info with monitors
Joern
opendev@REDACTED
Mon Feb 18 09:59:12 CET 2008
Hello Dave,
On 18/02/2008, Dave Smith <dizzyd@REDACTED> wrote:
> On several occasions, I've found myself wanting to be able to do some
> cleanup (e.g. remove an entry in ets) when a process dies.
I suppose that's the right way to do it - it was quite a recurring
pattern during the Erlang project I undertook last year (for what
that's worth). Being able to associate extra data with a monitor would
have made this extra functionality obsolete.
The state associated with the monitored processes was always in the
domain of the monitoring behaviour (e.g. connections per ip address)
however. Which meant that in many cases you actually wanted to have
access to this information for other reasons than cleaning up. So
either there needs to be a possibility to read the extra data from a
monitor or you keep just another state term in your process.
Best regards from Berlin,
Joern
More information about the erlang-questions
mailing list