--- IO-AIO/AIO.pm 2006/11/08 01:57:42 1.92 +++ IO-AIO/AIO.pm 2006/11/08 02:01:02 1.94 @@ -7,7 +7,8 @@ use IO::AIO; aio_open "/etc/passwd", O_RDONLY, 0, sub { - my ($fh) = @_; + my $fh = shift + or die "/etc/passwd: $!"; ... }; @@ -101,7 +102,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 @@ -973,9 +974,10 @@ =item IO::AIO::poll_wait -If there are any outstanding requests, wait till the result filehandle -becomes ready for reading (simply does a C on the filehandle. This is useful if you want to +synchronously wait for some requests to finish). See C for an example. @@ -987,7 +989,6 @@ equivalent to: IO::AIO::poll_wait, IO::AIO::poll_cb - if IO::AIO::nreqs; =item IO::AIO::flush