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

Comparing IO-AIO/README (file contents):
Revision 1.24 by root, Sun Aug 5 16:45:54 2007 UTC vs.
Revision 1.25 by root, Mon Sep 24 19:28:50 2007 UTC

273 Reads or writes $length bytes from the specified $fh and $offset 273 Reads or writes $length bytes from the specified $fh and $offset
274 into the scalar given by $data and offset $dataoffset and calls the 274 into the scalar given by $data and offset $dataoffset and calls the
275 callback without the actual number of bytes read (or -1 on error, 275 callback without the actual number of bytes read (or -1 on error,
276 just like the syscall). 276 just like the syscall).
277 277
278 If $offset is undefined, then the current file offset will be used 278 If $offset is undefined, then the current file descriptor offset
279 (and updated), otherwise the file offset will not be changed by 279 will be used (and updated), otherwise the file descriptor offset
280 these calls. 280 will not be changed by these calls.
281 281
282 If $length is undefined in "aio_write", use the remaining length of 282 If $length is undefined in "aio_write", use the remaining length of
283 $data. 283 $data.
284 284
285 If $dataoffset is less than zero, it will be counted from the end of 285 If $dataoffset is less than zero, it will be counted from the end of
851 $oldmaxreqs = IO::AIO::max_outstanding $maxreqs 851 $oldmaxreqs = IO::AIO::max_outstanding $maxreqs
852 This is a very bad function to use in interactive programs because 852 This is a very bad function to use in interactive programs because
853 it blocks, and a bad way to reduce concurrency because it is 853 it blocks, and a bad way to reduce concurrency because it is
854 inexact: Better use an "aio_group" together with a feed callback. 854 inexact: Better use an "aio_group" together with a feed callback.
855 855
856 Sets the maximum number of outstanding requests to $nreqs. If you to 856 Sets the maximum number of outstanding requests to $nreqs. If you do
857 queue up more than this number of requests, the next call to the 857 queue up more than this number of requests, the next call to the
858 "poll_cb" (and "poll_some" and other functions calling "poll_cb") 858 "poll_cb" (and "poll_some" and other functions calling "poll_cb")
859 function will block until the limit is no longer exceeded. 859 function will block until the limit is no longer exceeded.
860 860
861 The default value is very large, so there is no practical limit on 861 The default value is very large, so there is no practical limit on
907 bytes of memory. In addition, stat requests need a stat buffer (possibly 907 bytes of memory. In addition, stat requests need a stat buffer (possibly
908 a few hundred bytes), readdir requires a result buffer and so on. Perl 908 a few hundred bytes), readdir requires a result buffer and so on. Perl
909 scalars and other data passed into aio requests will also be locked and 909 scalars and other data passed into aio requests will also be locked and
910 will consume memory till the request has entered the done state. 910 will consume memory till the request has entered the done state.
911 911
912 This is now awfully much, so queuing lots of requests is not usually a 912 This is not awfully much, so queuing lots of requests is not usually a
913 problem. 913 problem.
914 914
915 Per-thread usage: 915 Per-thread usage:
916 916
917 In the execution phase, some aio requests require more memory for 917 In the execution phase, some aio requests require more memory for

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines