Boost logo

Boost Users :

Subject: Re: [Boost-users] [ASIO] directory monitor ASIO extension
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2014-08-06 12:16:35


On 6 Aug 2014 at 6:58, Brian Wood wrote:

> > * Works reliably on Microsoft Windows (hard), Linux (slightly
> > easier), BSD and OS X (easiest by far of the lot).
>
> I believe you. Having considered some of your previous
> comments in a different thread, on kqueue, I ported my
> code generator from Linux to BSD. I only found relief
> from a problem I was having by doing so.

kqueues are indeed the least worst solution available for watching
for change of anything, though they do consume fd's rapidly for
directory watching. I personally wish you could use the fd to
indicate what you want to watch, and then close the fd after
registering it with kqueue.

The huge problem with Microsoft's otherwise very good API is it can
spontaneously throw away data under load, and you can't recover and
retry. inotify under Linux has the same problem. That means you need
to checkpoint every success, and roll back to that last success and
run polling to calculate deltas until you can resync the watched
state with the ground state.

A real shame in that design :(

Niall

-- 
ned Productions Limited Consulting
http://www.nedproductions.biz/ 
http://ie.linkedin.com/in/nialldouglas/



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net