SpartanJ / efsw

efsw is a C++ cross-platform file system watcher and notifier.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FSEvents for OSX

SpartanJ opened this issue · comments

Original report by Mihail Slobodyanuk (Bitbucket: mihail_slobodyanuk, ).


Hello Martin!

I see Kqueue provider for BSD family have limit on opened file descriptors when for next watched directories will be used generic watcher, but it's not good. The API be able to recursive watching, so open descriptor only for root watch directory. JNotify uses it internally. I would like to plan implement that provider in next 2-3 month.

Have you investigated the usage FSEvents for Darwin or have any thinks about?

Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


Hi Mihail,
efsw uses FSEvents for OS X, i don't know why you're not seeing it:

https://bitbucket.org/SpartanJ/efsw/src/c4dc05166c3c3a56ebf45eb710ed0a08f9d2ec32/src/efsw/base.hpp?at=default&fileviewer=file-view-default#base.hpp-63

Original comment by Mihail Slobodyanuk (Bitbucket: mihail_slobodyanuk, ).


Default limit on opened files on OSX:

#sysctl -a | grep kern.maxfilesperproc
kern.maxfilesperproc: 10240


Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


And that's why you should be using the FSEvents backend :P

Original comment by Mihail Slobodyanuk (Bitbucket: mihail_slobodyanuk, ).


Oops. My fault. I badly researched the code

Original comment by Mihail Slobodyanuk (Bitbucket: mihail_slobodyanuk, ).


Already implemented