ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/IO-AIO/AIO.pm
(Generate patch)

Comparing IO-AIO/AIO.pm (file contents):
Revision 1.165 by root, Tue Aug 18 04:05:00 2009 UTC vs.
Revision 1.168 by root, Mon Nov 30 22:22:13 2009 UTC

191use common::sense; 191use common::sense;
192 192
193use base 'Exporter'; 193use base 'Exporter';
194 194
195BEGIN { 195BEGIN {
196 our $VERSION = '3.3'; 196 our $VERSION = '3.31';
197 197
198 our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close 198 our @AIO_REQ = qw(aio_sendfile aio_read aio_write aio_open aio_close
199 aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx 199 aio_stat aio_lstat aio_unlink aio_rmdir aio_readdir aio_readdirx
200 aio_scandir aio_symlink aio_readlink aio_sync aio_fsync 200 aio_scandir aio_symlink aio_readlink aio_sync aio_fsync
201 aio_fdatasync aio_sync_file_range aio_pathsync aio_readahead 201 aio_fdatasync aio_sync_file_range aio_pathsync aio_readahead
656 my $grp = aio_group $cb; 656 my $grp = aio_group $cb;
657 657
658 aioreq_pri $pri; 658 aioreq_pri $pri;
659 add $grp aio_open $src, O_RDONLY, 0, sub { 659 add $grp aio_open $src, O_RDONLY, 0, sub {
660 if (my $src_fh = $_[0]) { 660 if (my $src_fh = $_[0]) {
661 my @stat = stat $src_fh; # hmm, might bock over nfs? 661 my @stat = stat $src_fh; # hmm, might block over nfs?
662 662
663 aioreq_pri $pri; 663 aioreq_pri $pri;
664 add $grp aio_open $dst, O_CREAT | O_WRONLY | O_TRUNC, 0200, sub { 664 add $grp aio_open $dst, O_CREAT | O_WRONLY | O_TRUNC, 0200, sub {
665 if (my $dst_fh = $_[0]) { 665 if (my $dst_fh = $_[0]) {
666 aioreq_pri $pri; 666 aioreq_pri $pri;
1133=item $grp->cancel_subs 1133=item $grp->cancel_subs
1134 1134
1135Cancel all subrequests and clears any feeder, but not the group request 1135Cancel all subrequests and clears any feeder, but not the group request
1136itself. Useful when you queued a lot of events but got a result early. 1136itself. Useful when you queued a lot of events but got a result early.
1137 1137
1138The group request will finish normally (you cannot add requests to the
1139group).
1140
1138=item $grp->result (...) 1141=item $grp->result (...)
1139 1142
1140Set the result value(s) that will be passed to the group callback when all 1143Set the result value(s) that will be passed to the group callback when all
1141subrequests have finished and set the groups errno to the current value 1144subrequests have finished and set the groups errno to the current value
1142of errno (just like calling C<errno> without an error number). By default, 1145of errno (just like calling C<errno> without an error number). By default,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines