… | |
… | |
189 | use strict 'vars'; |
189 | use strict 'vars'; |
190 | |
190 | |
191 | use base 'Exporter'; |
191 | use base 'Exporter'; |
192 | |
192 | |
193 | BEGIN { |
193 | BEGIN { |
194 | our $VERSION = '2.1'; |
194 | our $VERSION = '2.2'; |
195 | |
195 | |
196 | our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat |
196 | our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat |
197 | aio_lstat aio_unlink aio_rmdir aio_readdir aio_scandir aio_symlink |
197 | aio_lstat aio_unlink aio_rmdir aio_readdir aio_scandir aio_symlink |
198 | aio_readlink aio_fsync aio_fdatasync aio_readahead aio_rename aio_link |
198 | aio_readlink aio_fsync aio_fdatasync aio_readahead aio_rename aio_link |
199 | aio_move aio_copy aio_group aio_nop aio_mknod); |
199 | aio_move aio_copy aio_group aio_nop aio_mknod); |
… | |
… | |
971 | poll => 'r', nice => 1, |
971 | poll => 'r', nice => 1, |
972 | cb => &IO::AIO::poll_cb); |
972 | cb => &IO::AIO::poll_cb); |
973 | |
973 | |
974 | =item IO::AIO::poll_wait |
974 | =item IO::AIO::poll_wait |
975 | |
975 | |
976 | Wait till the result filehandle becomes ready for reading (simply does a |
976 | If there are any outstanding requests, wait till the result filehandle |
977 | C<select> on the filehandle. This is useful if you want to synchronously |
977 | becomes ready for reading (simply does a C<select> on the filehandle. This |
978 | wait for some requests to finish). |
978 | is useful if you want to synchronously wait for some requests to finish). |
979 | |
979 | |
980 | See C<nreqs> for an example. |
980 | See C<nreqs> for an example. |
981 | |
981 | |
982 | =item IO::AIO::poll |
982 | =item IO::AIO::poll |
983 | |
983 | |
984 | Waits until some requests have been handled. |
984 | Waits until some requests have been handled. |
985 | |
985 | |
|
|
986 | Returns the number of requests processed, but is otherwise strictly |
986 | Strictly equivalent to: |
987 | equivalent to: |
987 | |
988 | |
988 | IO::AIO::poll_wait, IO::AIO::poll_cb |
989 | IO::AIO::poll_wait, IO::AIO::poll_cb |
989 | if IO::AIO::nreqs; |
990 | if IO::AIO::nreqs; |
990 | |
991 | |
991 | =item IO::AIO::flush |
992 | =item IO::AIO::flush |