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

Comparing IO-AIO/README (file contents):
Revision 1.9 by root, Tue Aug 16 23:33:38 2005 UTC vs.
Revision 1.10 by root, Wed Aug 17 05:26:20 2005 UTC

117 aio_write $fh,$offset,$length, $data,$dataoffset,$callback 117 aio_write $fh,$offset,$length, $data,$dataoffset,$callback
118 Reads or writes "length" bytes from the specified "fh" and "offset" 118 Reads or writes "length" bytes from the specified "fh" and "offset"
119 into the scalar given by "data" and offset "dataoffset" and calls 119 into the scalar given by "data" and offset "dataoffset" and calls
120 the callback without the actual number of bytes read (or -1 on 120 the callback without the actual number of bytes read (or -1 on
121 error, just like the syscall). 121 error, just like the syscall).
122
123 The $data scalar *MUST NOT* be modified in any way while the request
124 is outstanding. Modifying it can result in segfaults or WW3 (if the
125 necessary/optional hardware is installed).
122 126
123 Example: Read 15 bytes at offset 7 into scalar $buffer, starting at 127 Example: Read 15 bytes at offset 7 into scalar $buffer, starting at
124 offset 0 within the scalar: 128 offset 0 within the scalar:
125 129
126 aio_read $fh, 7, 15, $buffer, 0, sub { 130 aio_read $fh, 7, 15, $buffer, 0, sub {
271 if you set this to a relatively low number, such as 100. 275 if you set this to a relatively low number, such as 100.
272 276
273 Under normal circumstances you don't need to call this function. 277 Under normal circumstances you don't need to call this function.
274 278
275 FORK BEHAVIOUR 279 FORK BEHAVIOUR
276 IO::AIO handles all outstanding AIO requests before the fork, destroys 280 Before the fork IO::AIO enters a quiescent state where no requests can
277 all AIO threads, and recreates them in both the parent and the child 281 be added in other threads and no results will be processed. After the
278 after the fork. 282 fork the parent simply leaves the quiescent state and continues
283 request/result processing, while the child clears the request/result
284 queue and starts the same number of threads as were in use by the
285 parent.
279 286
280SEE ALSO 287SEE ALSO
281 Coro, Linux::AIO. 288 Coro, Linux::AIO.
282 289
283AUTHOR 290AUTHOR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines