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

Comparing EV/EV.pm (file contents):
Revision 1.5 by root, Fri Oct 26 19:25:00 2007 UTC vs.
Revision 1.6 by root, Sat Oct 27 07:30:10 2007 UTC

41 EV::loop EV::LOOP_ONSHOT; 41 EV::loop EV::LOOP_ONSHOT;
42 42
43=head1 DESCRIPTION 43=head1 DESCRIPTION
44 44
45This module provides an interface to libevent 45This module provides an interface to libevent
46(L<http://monkey.org/~provos/libevent/>). 46(L<http://monkey.org/~provos/libevent/>). You probably should acquaint
47yourself with its documentation and source code to be able to use this
48module fully.
49
50Please note thta this module disables the libevent EPOLL method by
51default, see BUGS, below, if you need to enable it.
47 52
48=cut 53=cut
49 54
50package EV; 55package EV;
51 56
204=head1 BUGS 209=head1 BUGS
205 210
206Lots. Libevent itself isn't well tested and rather buggy, and this module 211Lots. Libevent itself isn't well tested and rather buggy, and this module
207is quite new at the moment. 212is quite new at the moment.
208 213
214Please note that the epoll method is not, in general, reliable in
215programs that use fork (even if no libveent calls are being made in the
216forked process). Since this is such a common issue, this module will
217force the epoll method in EV to be off *unless* the global variable
218$EV::ENABLE_EPOLL is set to 1 *before* loading this module for the first
219time.
220
209=cut 221=cut
210 222
211our $NPRI = 4; 223our $NPRI = 4;
224our $BASE;
225our $ENABLE_EPOLL;
226
227{
228 local $ENV{EVENT_NOEPOLL};
229 $ENV{EVENT_NOEPOLL} = 1 unless $ENABLE_EPOLL;
212our $BASE = init; 230 $BASE = init;
231}
232
213priority_init $NPRI; 233priority_init $NPRI;
214 234
215push @AnyEvent::REGISTRY, [EV => "EV::AnyEvent"]; 235push @AnyEvent::REGISTRY, [EV => "EV::AnyEvent"];
216 236
2171; 2371;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines