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

Comparing EV/EV.pm (file contents):
Revision 1.73 by root, Fri Dec 21 05:10:01 2007 UTC vs.
Revision 1.75 by root, Fri Dec 21 10:36:22 2007 UTC

363Example: Register an I/O watcher for some UDP socket but do not keep the 363Example: Register an I/O watcher for some UDP socket but do not keep the
364event loop from running just because of that watcher. 364event loop from running just because of that watcher.
365 365
366 my $udp_socket = ... 366 my $udp_socket = ...
367 my $udp_watcher = EV::io $udp_socket, EV::READ, sub { ... }; 367 my $udp_watcher = EV::io $udp_socket, EV::READ, sub { ... };
368 $udp_watcher->keepalive (0); 368 $1000udp_watcher->keepalive (0);
369
370=item $loop = $w->loop
371
372Return the loop that this watcher is attached to.
369 373
370=back 374=back
371 375
372 376
373=head1 WATCHER TYPES 377=head1 WATCHER TYPES
902to be called on every event loop iteration by installing a C<EV::check> 906to be called on every event loop iteration by installing a C<EV::check>
903watcher: 907watcher:
904 908
905 my $async_check = EV::check sub { }; 909 my $async_check = EV::check sub { };
906 910
907This ensures that perl shortly gets into control for a short time, and 911This ensures that perl gets into control for a short time to handle any
908also ensures slower overall operation. 912pending signals, and also ensures (slightly) slower overall operation.
909 913
910=head1 THREADS 914=head1 THREADS
911 915
912Threads are not supported by this module in any way. Perl pseudo-threads 916Threads are not supported by this module in any way. Perl pseudo-threads
913is evil stuff and must die. As soon as Perl gains real threads I will work 917is evil stuff and must die. As soon as Perl gains real threads I will work

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines