
Well, I don't think anything bad will happen, but I think I remember there being no/little buffering, so your program had to be responsive if you wanted to get the events. fseventsd is a daemon on top that keeps logs, so you can read them at leisure. I'm sorry I can't find the original article I had read to learn this, otherwise I'd link you directly so you could make your own judgements. I think the decision between the two is primarily based on your use case. If you are intended to run continuously and handling each event will probably not use that many resources (as to not bog down the system as you receive many file system events), and you need real-time tracking, kqueue is for you. Conversely, if you need to know things changed soon after, but not immediately, and especially if you don't want to be running continuously, then fseventsd is for you. This is my understanding, not having used either directly (I've only used inotify on linux). -Ross On Dec 4, 2009, at 11:39 AM, Svein Ove Aas wrote:
On Fri, Dec 4, 2009 at 5:31 PM, Ross Mellgren
wrote: kqueue is the "low level" interface, but requires that you handle all file system events as they happen, and fast.
For the purposes of creating a binding in haskell, my preferred way would be to use the low-level interface and build saner abstractions on top of that; it would be trivial to buffer them haskell-side.
That said.. you say you have to handle the events "fast". What happens if you don't?
-- Svein Ove Aas