OS X watch service

Michael Hall mik3hall at gmail.com
Sat Dec 17 01:33:23 UTC 2016

Fwiw and in case this gives someone something more to go on. 
The problems I’m having with a kqueue based OS X watch service seem to have nothing really to do with a deadlock with my code.
But, instead, some actual problem with kqueue handling LotsOfEvents. 
I commented out the event handling code.

//            drainAndCheckOverflowEvents(watcher, ENTRY_CREATE, n);

The problem persisted. It doesn’t seem to clear until the test code starts to delete files - then kqueue resumes posting events. 
If I comment out the delete code the problem does not clear.

So does anyone know anything about kqueue limits? How to increase them? How to check for their being reached? 
After some googling I tried…

sudo sysctl -w kern.maxfilesperproc=400000
ulimit -n 4096
Neither seems to make any difference.

If anyone knows anything about these their suggestions would be appreciated. Otherwise I’ll keep looking. 

Michael Hall

More information about the nio-dev mailing list