… | |
… | |
26 | $req->cancel; # cancel request if still in queue |
26 | $req->cancel; # cancel request if still in queue |
27 | |
27 | |
28 | my $grp = aio_group sub { print "all stats done\n" }; |
28 | my $grp = aio_group sub { print "all stats done\n" }; |
29 | add $grp aio_stat "..." for ...; |
29 | add $grp aio_stat "..." for ...; |
30 | |
30 | |
31 | # AnyEvent integration (EV, Event, Glib, Tk, urxvt, pureperl...) |
31 | # AnyEvent integration (EV, Event, Glib, Tk, POE, urxvt, pureperl...) |
32 | open my $fh, "<&=" . IO::AIO::poll_fileno or die "$!"; |
32 | use AnyEvent::AIO; |
33 | my $w = AnyEvent->io (fh => $fh, poll => 'r', cb => sub { IO::AIO::poll_cb }); |
|
|
34 | |
33 | |
35 | # EV integration |
34 | # EV integration |
36 | my $w = EV::io IO::AIO::poll_fileno, EV::READ, \&IO::AIO::poll_cb; |
35 | my $w = EV::io IO::AIO::poll_fileno, EV::READ, \&IO::AIO::poll_cb; |
37 | |
36 | |
38 | # Event integration |
37 | # Event integration |
… | |
… | |
194 | use strict 'vars'; |
193 | use strict 'vars'; |
195 | |
194 | |
196 | use base 'Exporter'; |
195 | use base 'Exporter'; |
197 | |
196 | |
198 | BEGIN { |
197 | BEGIN { |
199 | our $VERSION = '2.62'; |
198 | our $VERSION = '3.02'; |
200 | |
199 | |
201 | our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close |
200 | our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close |
202 | aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir |
201 | aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir |
203 | aio_scandir aio_symlink aio_readlink aio_sync aio_fsync |
202 | aio_scandir aio_symlink aio_readlink aio_sync aio_fsync |
204 | aio_fdatasync aio_pathsync aio_readahead |
203 | aio_fdatasync aio_pathsync aio_readahead |
… | |
… | |
1342 | |
1341 | |
1343 | Known bugs will be fixed in the next release. |
1342 | Known bugs will be fixed in the next release. |
1344 | |
1343 | |
1345 | =head1 SEE ALSO |
1344 | =head1 SEE ALSO |
1346 | |
1345 | |
1347 | L<Coro::AIO>. |
1346 | L<AnyEvent::AIO> for easy integration into event loops, L<Coro::AIO> for a |
|
|
1347 | more natural syntax. |
1348 | |
1348 | |
1349 | =head1 AUTHOR |
1349 | =head1 AUTHOR |
1350 | |
1350 | |
1351 | Marc Lehmann <schmorp@schmorp.de> |
1351 | Marc Lehmann <schmorp@schmorp.de> |
1352 | http://home.schmorp.de/ |
1352 | http://home.schmorp.de/ |