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.111 by root, Mon Aug 13 12:08:13 2007 UTC vs.
Revision 1.115 by root, Mon Sep 24 18:14:00 2007 UTC

189use strict 'vars'; 189use strict 'vars';
190 190
191use base 'Exporter'; 191use base 'Exporter';
192 192
193BEGIN { 193BEGIN {
194 our $VERSION = '2.4'; 194 our $VERSION = '2.41';
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 aio_load aio_rmtree aio_mkdir 199 aio_move aio_copy aio_group aio_nop aio_mknod aio_load aio_rmtree aio_mkdir
329Reads or writes C<$length> bytes from the specified C<$fh> and C<$offset> 329Reads or writes C<$length> bytes from the specified C<$fh> and C<$offset>
330into the scalar given by C<$data> and offset C<$dataoffset> and calls the 330into the scalar given by C<$data> and offset C<$dataoffset> and calls the
331callback without the actual number of bytes read (or -1 on error, just 331callback without the actual number of bytes read (or -1 on error, just
332like the syscall). 332like the syscall).
333 333
334If C<$offset> is undefined, then the current file offset will be used (and 334If C<$offset> is undefined, then the current file descriptor offset will
335updated), otherwise the file offset will not be changed by these calls. 335be used (and updated), otherwise the file descriptor offset will not be
336changed by these calls.
336 337
337If C<$length> is undefined in C<aio_write>, use the remaining length of C<$data>. 338If C<$length> is undefined in C<aio_write>, use the remaining length of C<$data>.
338 339
339If C<$dataoffset> is less than zero, it will be counted from the end of 340If C<$dataoffset> is less than zero, it will be counted from the end of
340C<$data>. 341C<$data>.
341 342
342The C<$data> scalar I<MUST NOT> be modified in any way while the request 343The C<$data> scalar I<MUST NOT> be modified in any way while the request
1206This is a very bad function to use in interactive programs because it 1207This is a very bad function to use in interactive programs because it
1207blocks, and a bad way to reduce concurrency because it is inexact: Better 1208blocks, and a bad way to reduce concurrency because it is inexact: Better
1208use an C<aio_group> together with a feed callback. 1209use an C<aio_group> together with a feed callback.
1209 1210
1210Sets the maximum number of outstanding requests to C<$nreqs>. If you 1211Sets the maximum number of outstanding requests to C<$nreqs>. If you
1211to queue up more than this number of requests, the next call to the 1212do queue up more than this number of requests, the next call to the
1212C<poll_cb> (and C<poll_some> and other functions calling C<poll_cb>) 1213C<poll_cb> (and C<poll_some> and other functions calling C<poll_cb>)
1213function will block until the limit is no longer exceeded. 1214function will block until the limit is no longer exceeded.
1214 1215
1215The default value is very large, so there is no practical limit on the 1216The default value is very large, so there is no practical limit on the
1216number of outstanding requests. 1217number of outstanding requests.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines