[erlang-questions] new version of file_monitor.erl - beta testers wanted
Mon Jan 12 10:37:16 CET 2009
On Sat, Jan 10, 2009 at 23:43, Richard Carlsson <> wrote:
> I've been rewriting my file monitor module: it's still polling only, but
> now it's a gen_server, supports recursive monitoring, and is documented:
One problem I found is that for larger directory trees, the
automonitor call times out because it takes more than 5 seconds. The
API could be extended with a 'timeout' argument, I suppose.
Also, the server is blocking until the automonitor call returns,
meaning it can't be cleanly stopped. The automonitor handler should
probably use noreply and proceed in the background.
This brings up an idea for extending gen_server or creating a new
behaviour (gen_task) for long-running operations: it would be useful
sometimes to be able to interrupt them and to monitor their status
(some kind of progress report?).
More information about the erlang-questions