--- IO-AIO/AIO.pm 2006/10/25 17:57:30 1.77 +++ IO-AIO/AIO.pm 2006/10/26 12:38:04 1.78 @@ -782,6 +782,9 @@ regularly. Returns the number of events processed. Returns immediately when no events are outstanding. +If not all requests were processed for whatever reason, the filehandle +will still be ready when C returns. + Example: Install an Event watcher that automatically calls IO::AIO::poll_cb with high priority: @@ -789,6 +792,22 @@ poll => 'r', async => 1, cb => \&IO::AIO::poll_cb); +=item IO::AIO::poll_some $max_requests + +Similar to C, but only processes up to C<$max_requests> requests +at a time. + +Useful if you want to ensure some level of interactiveness when perl is +not fast enough to process all requests in time. + +Example: Install an Event watcher that automatically calls +IO::AIO::poll_some with low priority, to ensure that other parts of the +program get the CPU sometimes even under high AIO load. + + Event->io (fd => IO::AIO::poll_fileno, + poll => 'r', nice => 1, + cb => sub { IO::AIO::poll_some 256 }); + =item IO::AIO::poll_wait Wait till the result filehandle becomes ready for reading (simply does a