tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: GSoC 2011 project proposal [Add kqueue support to GIO]
On Tue, Mar 29, 2011 at 4:17 PM, David Young <dyoung%pobox.com@localhost> wrote:
> On Tue, Mar 29, 2011 at 10:41:37AM +0100, Julio Merino wrote:
>> As an example, several server packages have file-notification
>> functionality. One that I'm using is Mediatomb: the lack of proper
>> file notifications makes it pretty much unusable because polling is a
>> very slow alternative when the trees to monitor are huge.
>
> Julio,
>
> Are you sure that kqueue supports monitoring trees? I know that
> it's possible for to watch a directory with kqueue for nodes
> added/deleted/renamed, however, when a process watches directory x/ with
> kqueue it won't necessarily wake up if there is a change under x/y/ or
> x/y/z/.
As far as I know, you are right, kqueue won't work to monitor trees.
My understanding is that, to watch for changes to a particular tree,
you need to watch all the directories in such tree.
I hadn't thought of the need to watch whole trees being a problem
though. I don't think this is a general case in desktop applications,
and for something like mediatomb, the amount of files to watch should
be (well, at least in my case ;-) way larger than the amount of
directories.
Does inotify support this?
An alternative solution to the "monitoring trees" problem is what OS X
does: http://arstechnica.com/apple/reviews/2007/10/mac-os-x-10-5.ars/7
--
Julio Merino / @jmmv
Home |
Main Index |
Thread Index |
Old Index