--- IO-AIO/README 2006/10/31 00:45:41 1.20 +++ IO-AIO/README 2006/12/22 04:05:50 1.21 @@ -5,7 +5,8 @@ use IO::AIO; aio_open "/etc/passwd", O_RDONLY, 0, sub { - my ($fh) = @_; + my $fh = shift + or die "/etc/passwd: $!"; ... }; @@ -97,7 +98,7 @@ # queue the request to open /etc/passwd aio_open "/etc/passwd", O_RDONLY, 0, sub { - my $fh = $_[0] + my $fh = shift or die "error while opening: $!"; # stat'ing filehandles is generally non-blocking @@ -713,19 +714,20 @@ cb => &IO::AIO::poll_cb); IO::AIO::poll_wait - Wait till the result filehandle becomes ready for reading (simply - does a "select" on the filehandle. This is useful if you want to - synchronously wait for some requests to finish). + If there are any outstanding requests and none of them in the result + phase, wait till the result filehandle becomes ready for reading + (simply does a "select" on the filehandle. This is useful if you + want to synchronously wait for some requests to finish). See "nreqs" for an example. IO::AIO::poll Waits until some requests have been handled. - Strictly equivalent to: + Returns the number of requests processed, but is otherwise strictly + equivalent to: IO::AIO::poll_wait, IO::AIO::poll_cb - if IO::AIO::nreqs; IO::AIO::flush Wait till all outstanding AIO requests have been handled.