--- IO-AIO/AIO.pm 2005/07/11 01:03:17 1.12 +++ IO-AIO/AIO.pm 2005/07/11 03:09:00 1.15 @@ -24,7 +24,7 @@ # Glib/Gtk2 add_watch Glib::IO IO::AIO::poll_fileno, - \&IO::AIO::poll_cb; + sub { IO::AIO::poll_cb, 1 }; # Tk Tk::Event::IO->fileevent (IO::AIO::poll_fileno, "", @@ -77,11 +77,11 @@ All the C calls are more or less thin wrappers around the syscall with the same name (sans C). The arguments are similar or identical, -and they all accept an additional C<$callback> argument which must be -a code reference. This code reference will get called with the syscall -return code (e.g. most syscalls return C<-1> on error, unlike perl, which -usually delivers "false") as it's sole argument when the given syscall has -been executed asynchronously. +and they all accept an additional (and optional) C<$callback> argument +which must be a code reference. This code reference will get called with +the syscall return code (e.g. most syscalls return C<-1> on error, unlike +perl, which usually delivers "false") as it's sole argument when the given +syscall has been executed asynchronously. All functions that expect a filehandle will also accept a file descriptor. @@ -239,6 +239,20 @@ Wait till all outstanding AIO requests have been handled. +Strictly equivalent to: + + IO::AIO::poll_wait, IO::AIO::poll_cb + while IO::AIO::nreqs; + +=item IO::AIO::poll + +Waits until some requests have been handled. + +Strictly equivalent to: + + IO::AIO::poll_wait, IO::AIO::poll_cb + if IO::AIO::nreqs; + =item IO::AIO::min_parallel $nthreads Set the minimum number of AIO threads to C<$nthreads>. The default is