ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/EV/Makefile.PL
(Generate patch)

Comparing EV/Makefile.PL (file contents):
Revision 1.23 by root, Thu Nov 22 04:52:24 2007 UTC vs.
Revision 1.24 by root, Fri Nov 23 03:39:15 2007 UTC

116print <<EOF; 116print <<EOF;
117 117
118*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** 118*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
119 119
120 120
121EV by default uses select, which makes it hard to write efficient servers, 121Select and poll make it hard to write efficient servers, especially if the
122especially if the number of active connections is much lower than the open 122number of active connections is much lower than the watched ones. GNU/Linux
123ones. GNU/Linux systems have a more scalable method called "epoll", which 123systems have a more scalable method called "epoll", which EV can use. For
124EV can use. For this to work, both your kernel and glibc have to support 124this to work, both your kernel and glibc have to support epoll, but if you
125epoll, but if you can compile it, the detection will be done at runtime, 125can compile it, the detection will be done at runtime, and EV will safely
126and EV will safely fall back to using select when epoll isn't available. 126fall back to using select when epoll isn't available. If unsure, accept
127If unsure, accept the default. 127the default.
128 128
129EOF 129EOF
130 130
131$DEFINE .= " -DEV_USE_EPOLL=" . (0 + (prompt ("Enable epoll backend (y/n)?", (-e "/usr/include/sys/epoll.h") ? "y" : "n") =~ /[yY]/)); 131$DEFINE .= " -DEV_USE_EPOLL=" . (0 + (prompt ("Enable epoll backend (y/n)?", (-e "/usr/include/sys/epoll.h") ? "y" : "n") =~ /[yY]/));
132 132
138Similarly to the epoll backend above, EV can take advantage of kqueue on 138Similarly to the epoll backend above, EV can take advantage of kqueue on
139many BSD systems. Support for kqueue will be detected at runtime, with a 139many BSD systems. Support for kqueue will be detected at runtime, with a
140safe fallback to other methods when it cannot be used. 140safe fallback to other methods when it cannot be used.
141 141
142Note that kqueue is broken on most operating systems, so it defaults to 142Note that kqueue is broken on most operating systems, so it defaults to
143'n' on most platforms that claim to support it. Here is what we know: 143'n' on everything but netbsd. Here is what we know:
144 144
145OS X: completely, utterly broken on at least <= 10.5. 145NetBSD: working in at least 3.1. Yeah! :)
146FreeBSD: broken on at least <= 6.2-STABLE, 146FreeBSD: broken on at least 6.2-STABLE,
147 sockets and pipes *might* work, ptys definitely don't. 147 sockets and pipes *might* work, ptys definitely don't.
148NetBSD: reports indicate that it likely WORKS. Yeah! :)
149OpenBSD: reports indicate that it likely doesn't work 148OpenBSD: reports indicate that it likely doesn't work
150 (similar problems as on FreeBSD). 149 (similar problems as on FreeBSD).
150OS X: completely, utterly broken on at least <= 10.5.
151 151
152EOF 152EOF
153 153
154my $can_kqueue = $^O =~ /netbsd/i && -e "/usr/include/sys/event.h"; 154my $can_kqueue = $^O =~ /netbsd/i && -e "/usr/include/sys/event.h";
155 155

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines