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

Comparing IO-AIO/AIO.pm (file contents):
Revision 1.77 by root, Wed Oct 25 17:57:30 2006 UTC vs.
Revision 1.78 by root, Thu Oct 26 12:38:04 2006 UTC

780 780
781Process all outstanding events on the result pipe. You have to call this 781Process all outstanding events on the result pipe. You have to call this
782regularly. Returns the number of events processed. Returns immediately 782regularly. Returns the number of events processed. Returns immediately
783when no events are outstanding. 783when no events are outstanding.
784 784
785If not all requests were processed for whatever reason, the filehandle
786will still be ready when C<poll_cb> returns.
787
785Example: Install an Event watcher that automatically calls 788Example: Install an Event watcher that automatically calls
786IO::AIO::poll_cb with high priority: 789IO::AIO::poll_cb with high priority:
787 790
788 Event->io (fd => IO::AIO::poll_fileno, 791 Event->io (fd => IO::AIO::poll_fileno,
789 poll => 'r', async => 1, 792 poll => 'r', async => 1,
790 cb => \&IO::AIO::poll_cb); 793 cb => \&IO::AIO::poll_cb);
794
795=item IO::AIO::poll_some $max_requests
796
797Similar to C<poll_cb>, but only processes up to C<$max_requests> requests
798at a time.
799
800Useful if you want to ensure some level of interactiveness when perl is
801not fast enough to process all requests in time.
802
803Example: Install an Event watcher that automatically calls
804IO::AIO::poll_some with low priority, to ensure that other parts of the
805program get the CPU sometimes even under high AIO load.
806
807 Event->io (fd => IO::AIO::poll_fileno,
808 poll => 'r', nice => 1,
809 cb => sub { IO::AIO::poll_some 256 });
791 810
792=item IO::AIO::poll_wait 811=item IO::AIO::poll_wait
793 812
794Wait till the result filehandle becomes ready for reading (simply does a 813Wait till the result filehandle becomes ready for reading (simply does a
795C<select> on the filehandle. This is useful if you want to synchronously wait 814C<select> on the filehandle. This is useful if you want to synchronously wait

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines