Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the AnyEvent-Filesys-Notify CPAN distribution.

Report information
The Basics
Id: 82199
Status: resolved
Priority: 0/
Queue: AnyEvent-Filesys-Notify

People
Owner: Nobody in particular
Requestors: pagenyon [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: use kqueue for mac and other bsds
It took me a while to figure out why this wasn't working on my mac. I had disabled spotlight indexing because it caused excessive cpu and i/o load, but as a result mac fsevents no longer work. But macs have kqueue, and according to wikipedia, the other major bsds have it also. So maybe switch from Mac::FSEvents to kqueue and let the other bsds use kqueue as well. https://en.wikipedia.org/wiki/Kqueue
Subject: Re: [rt.cpan.org #82199] use kqueue for mac and other bsds
Date: Wed, 9 Jan 2013 20:03:26 -0500
To: bug-AnyEvent-Filesys-Notify <bug-AnyEvent-Filesys-Notify [...] rt.cpan.org>
From: Mark Grimes <mgrimes [...] cpan.org>
There is already a KQueue backend for AEFN, but it is only used when the running on FreeBSD. I hadn't thought about making the backends available on alternate operating systems--that was a design flaw. I've gone ahead and attempted to fix the design flaw with release of v0.17. Now instead of the backends being named AEFN::Role::Mac/Linux/FreeBSD they are AEFN::Role::FSEvents/Inotify2/KQueue. Each O/S still defaults to the same backend (that means FSEvents for Mac), but now there is a "backend" argument that can be used to force a particular implementation. In your case, you could add " backend => 'KQueue' " to the ->new() call and you should get KQueue instead of FSEvents. Unfortunately, IO::KQueue is giving me fits. I don't use FreeBSD (darwin, but not FreeBSD directly). (I haven't even been able to get good instances up and running under vagrant to test with.) The AEFN::Role::KQueue was implemented and tested by another user, Gasol Wu. It works well for him and it passes cpantester smoke tests on FreeBSD, but it does not work for me on my Mac. I get an "invalid argument" error when testing. If you have any experience with IO::KQueue on a Mac, I am open to suggestions, patches, etc. The module is hosted on github (https://github.com/mvgrimes/AnyEvent-Filesys-Notify). Thanks, Mark On Mon, Dec 24, 2012 at 3:40 AM, pagenyon via RT <bug-AnyEvent-Filesys-Notify@rt.cpan.org> wrote: Show quoted text
> Mon Dec 24 03:40:48 2012: Request 82199 was acted upon. > Transaction: Ticket created by pagenyon > Queue: AnyEvent-Filesys-Notify > Subject: use kqueue for mac and other bsds > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: pagenyon@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=82199 > > > > It took me a while to figure out why this wasn't working on my mac. I > had disabled spotlight indexing because it caused excessive cpu and i/o > load, but as a result mac fsevents no longer work. But macs have kqueue, > and according to wikipedia, the other major bsds have it also. So maybe > switch from Mac::FSEvents to kqueue and let the other bsds use kqueue as > well. > > > https://en.wikipedia.org/wiki/Kqueue
The KQueue backend is now working fine on macs. Add the "backend => 'KQueue'" argument to AEFN->new() and you should get a KQueue instead of FSEvent.