--- IO-AIO/AIO.pm 2012/12/13 02:26:28 1.239 +++ IO-AIO/AIO.pm 2014/01/25 00:15:52 1.245 @@ -70,7 +70,6 @@ This is a simple example that uses the EV module and loads F asynchronously: - use Fcntl; use EV; use IO::AIO; @@ -170,7 +169,7 @@ use base 'Exporter'; BEGIN { - our $VERSION = '4.18'; + our $VERSION = 4.2; our @AIO_REQ = qw(aio_sendfile aio_seek aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx @@ -605,8 +604,8 @@ fsid => 1810 } -Here is a (likely partial) list of fsid values used by Linux - it is safe -to hardcode these when the $^O is C: +Here is a (likely partial - send me updates!) list of fsid values used by +Linux - it is safe to hardcode these when C<$^O> is C: 0x0000adf5 adfs 0x0000adff affs @@ -797,6 +796,10 @@ Asynchronously rename the object at C<$srcpath> to C<$dstpath>, just as rename(2) and call the callback with the result code. +On systems that support the AIO::WD working directory abstraction +natively, the case C<[$wd, "."]> as C<$srcpath> is specialcased - instead +of failing, C is called on the absolute path of C<$wd>. + =item aio_mkdir $pathname, $mode, $callback->($status) @@ -810,6 +813,10 @@ Asynchronously rmdir (delete) a directory and call the callback with the result code. +On systems that support the AIO::WD working directory abstraction +natively, the case C<[$wd, "."]> is specialcased - instead of failing, +C is called on the absolute path of C<$wd>. + =item aio_readdir $pathname, $callback->($entries) @@ -1550,9 +1557,6 @@ C callback, as future requests using the value will fail in the expected way. -If this call isn't available because your OS lacks it or it couldn't be -detected, it will be emulated by calling C instead. - =item IO::AIO::CWD This is a compiletime constant (object) that represents the process @@ -1574,6 +1578,8 @@ warn "path is $_[0]\n"; }; +Currently, C always, and C and C +sometimes, fall back to using an absolue path. =head2 IO::AIO::REQ CLASS @@ -1761,16 +1767,19 @@ =item IO::AIO::poll_cb -Process some outstanding events on the result pipe. You have to call -this regularly. Returns C<0> if all events could be processed (or there -were no events to process), or C<-1> if it returned earlier for whatever -reason. Returns immediately when no events are outstanding. The amount of -events processed depends on the settings of C and -C. - -If not all requests were processed for whatever reason, the filehandle -will still be ready when C returns, so normally you don't have to -do anything special to have it called later. +Process some requests that have reached the result phase (i.e. they have +been executed but the results are not yet reported). You have to call +this "regularly" to finish outstanding requests. + +Returns C<0> if all events could be processed (or there were no +events to process), or C<-1> if it returned earlier for whatever +reason. Returns immediately when no events are outstanding. The amount +of events processed depends on the settings of C, +C and C. + +If not all requests were processed for whatever reason, the poll file +descriptor will still be ready when C returns, so normally you +don't have to do anything special to have it called later. Apart from calling C when the event filehandle becomes ready, it can be beneficial to call this function from loops which submit @@ -1789,10 +1798,11 @@ =item IO::AIO::poll_wait -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 C