Freebsd 8.1 adds an EVFILT_USER event type to kqueue. We could use it instead of socketpairs to get slightly better performance in evthread_notify_base on FreeBSD >=8.1 with kqueue.
See the FreeBSD 8.1 kevent manpage for full information.
I tried this on my bsd vms where it worked fine; Sebastian tried it on osx 10.6 where notifications were apparently not delivered . Need to investigate why.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Mac OSX 10.6 has EVFILT_USER too. In fact, that's where it came from.
Moving this to patches: there's a preliminary version in my 21_kqueue_hacking branch. It needs more work and testing.
I tried this on my bsd vms where it worked fine; Sebastian tried it on osx 10.6 where notifications were apparently not delivered . Need to investigate why.
We added EVFILT_USER code in 53a07fe in 2.1.2-alpha.