Hi Mark, Thanks for putting this together, it looks really promising! I hope to have the time to look at it in more depth early this week, and am happy to answer any questions you have about how libdispatch uses the kqueue API. Also, please keep us posted on your progress. Kevin On Sep 27, 2009, at 7:40 PM, Mark Heily wrote:
After looking at the differences between kqueue(2) and libevent, I decided it would be best to write a very thin wrapper library to emulate kqueue on non-BSD platforms. I've gotten pretty far with the effort to port kqueue to Linux, and wanted to let everyone know that this is a work-in-progress. The working title of this effort is "libkqueue".
If you are curious, you can download the libkqueue source code from here:
Currently, I have implemented the EVFILT_READ, EVFILT_WRITE, and EVFILT_SIGNAL filter types. I plan to implement EVFILT_VNODE using inotify, and EVFILT_TIMER using timerfds. I might have to implement EVFILT_PROC using a helper thread. After the Linux port is complete, I'll consider other Unixes such as OpenSolaris. I'm not a Windows developer, so if anyone wants to help with a Windows port, that would be great.
It is my hope that the quality and completeness of libkqueue will soon be sufficient enough to be used with libdispatch.
Regards,
- Mark