… | |
… | |
618 | This backend maps C<EV_READ> and C<EV_WRITE> in the same way as |
618 | This backend maps C<EV_READ> and C<EV_WRITE> in the same way as |
619 | C<EVBACKEND_POLL>. |
619 | C<EVBACKEND_POLL>. |
620 | |
620 | |
621 | =item C<EVBACKEND_KQUEUE> (value 8, most BSD clones) |
621 | =item C<EVBACKEND_KQUEUE> (value 8, most BSD clones) |
622 | |
622 | |
623 | Kqueue deserves special mention, as at the time of this writing, it |
623 | Kqueue deserves special mention, as at the time this backend was |
624 | was broken on all BSDs except NetBSD (usually it doesn't work reliably |
624 | implemented, it was broken on all BSDs except NetBSD (usually it doesn't |
625 | with anything but sockets and pipes, except on Darwin, where of course |
625 | work reliably with anything but sockets and pipes, except on Darwin, |
626 | it's completely useless). Unlike epoll, however, whose brokenness |
626 | where of course it's completely useless). Unlike epoll, however, whose |
627 | is by design, these kqueue bugs can (and eventually will) be fixed |
627 | brokenness is by design, these kqueue bugs can be (and mostly have been) |
628 | without API changes to existing programs. For this reason it's not being |
628 | fixed without API changes to existing programs. For this reason it's not |
629 | "auto-detected" unless you explicitly specify it in the flags (i.e. using |
629 | being "auto-detected" on all platforms unless you explicitly specify it |
630 | C<EVBACKEND_KQUEUE>) or libev was compiled on a known-to-be-good (-enough) |
630 | in the flags (i.e. using C<EVBACKEND_KQUEUE>) or libev was compiled on a |
631 | system like NetBSD. |
631 | known-to-be-good (-enough) system like NetBSD. |
632 | |
632 | |
633 | You still can embed kqueue into a normal poll or select backend and use it |
633 | You still can embed kqueue into a normal poll or select backend and use it |
634 | only for sockets (after having made sure that sockets work with kqueue on |
634 | only for sockets (after having made sure that sockets work with kqueue on |
635 | the target platform). See C<ev_embed> watchers for more info. |
635 | the target platform). See C<ev_embed> watchers for more info. |
636 | |
636 | |