[erlang-questions] new version of file_monitor.erl - beta testers wanted

Vlad Dumitrescu vladdu55@REDACTED
Mon Jan 12 10:37:16 CET 2009


Hi Richard,

On Sat, Jan 10, 2009 at 23:43, Richard Carlsson <richardc@REDACTED> 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:
> http://svn.process-one.net/contribs/trunk/eunit/doc/file_monitor.html.

Very nice.

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?).

best regards,
Vlad



More information about the erlang-questions mailing list