Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
How to monitor a specific file for changes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sylvain Le Gall <sylvain@l...>
Subject: Re: How to monitor a specific file for changes

On 24-10-2007, Karl Zilles <> wrote:
> Richard Jones wrote:
>> /me weeps.
>> Please don't do this.  Processes which regularly poll are a bane for
>> people who are working to reduce the power consumption of laptops and
>> servers.
> While your heart is in the right place, I think your priorities are 
> wrong on this one.  They guy is writing a thesis project, not a 
> commercial application.
> Let him get it coded.  I'm sure he's got more to worry about than saving 
> a few watts here and there.  Or perhaps, if you feel strongly about it, 
> you can contribute some tested code that works on Mac OS X and linux 
> platforms.

I strongly disagree with your remark, it is not a save "a few watts here
and there". This kind of modification can make your program 100% faster
than a "poll every seconds". Moreover, knowing how to program
in a "reactive" way is something that most people tend to ignore but
which is really a good thing to learn (and most of the time it changes
the architecture of your program).

OFf course, for the sake of "quick and dirty" programming, you can just
ignore everything and go directly to the easy solution... The only
problem is that the "quick and dirty" initial programming that should
have been rewritten, never get rewritten and you end up with  something
really not efficient "in production".

Sylvain Le Gall