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.247 by root, Tue Jun 3 01:30:33 2014 UTC vs.
Revision 1.248 by root, Sun Jul 27 22:10:53 2014 UTC

1931 1931
1932This is a very bad function to use in interactive programs because it 1932This is a very bad function to use in interactive programs because it
1933blocks, and a bad way to reduce concurrency because it is inexact: Better 1933blocks, and a bad way to reduce concurrency because it is inexact: Better
1934use an C<aio_group> together with a feed callback. 1934use an C<aio_group> together with a feed callback.
1935 1935
1936It's main use is in scripts without an event loop - when you want to stat 1936Its main use is in scripts without an event loop - when you want to stat
1937a lot of files, you can write somehting like this: 1937a lot of files, you can write somehting like this:
1938 1938
1939 IO::AIO::max_outstanding 32; 1939 IO::AIO::max_outstanding 32;
1940 1940
1941 for my $path (...) { 1941 for my $path (...) {
1981 1981
1982=back 1982=back
1983 1983
1984=head3 MISCELLANEOUS FUNCTIONS 1984=head3 MISCELLANEOUS FUNCTIONS
1985 1985
1986IO::AIO implements some functions that might be useful, but are not 1986IO::AIO implements some functions that are useful when you want to use
1987asynchronous. 1987some "Advanced I/O" function not available to in Perl, without going the
1988"Asynchronous I/O" route. Many of these have an asynchronous C<aio_*>
1989counterpart.
1988 1990
1989=over 4 1991=over 4
1990 1992
1991=item IO::AIO::sendfile $ofh, $ifh, $offset, $count 1993=item IO::AIO::sendfile $ofh, $ifh, $offset, $count
1992 1994
2110 2112
2111See the C<splice(2)> manpage for details. 2113See the C<splice(2)> manpage for details.
2112 2114
2113=item IO::AIO::tee $r_fh, $w_fh, $length, $flags 2115=item IO::AIO::tee $r_fh, $w_fh, $length, $flags
2114 2116
2115Calls the GNU/Linux C<tee(2)> syscall, see it's manpage and the 2117Calls the GNU/Linux C<tee(2)> syscall, see its manpage and the
2116description for C<IO::AIO::splice> above for details. 2118description for C<IO::AIO::splice> above for details.
2117 2119
2118=item $actual_size = IO::AIO::pipesize $r_fh[, $new_size] 2120=item $actual_size = IO::AIO::pipesize $r_fh[, $new_size]
2119 2121
2120Attempts to query or change the pipe buffer size. Obviously works only 2122Attempts to query or change the pipe buffer size. Obviously works only

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines