… | |
… | |
275 | Or in other words: the file descriptor will be closed, but it will |
275 | Or in other words: the file descriptor will be closed, but it will |
276 | not be free for reuse until the perl filehandle is closed. |
276 | not be free for reuse until the perl filehandle is closed. |
277 | |
277 | |
278 | aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
278 | aio_read $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
279 | aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
279 | aio_write $fh,$offset,$length, $data,$dataoffset, $callback->($retval) |
280 | Reads or writes $length bytes from the specified $fh and $offset |
280 | Reads or writes $length bytes from or to the specified $fh and |
281 | into the scalar given by $data and offset $dataoffset and calls the |
281 | $offset into the scalar given by $data and offset $dataoffset and |
282 | callback without the actual number of bytes read (or -1 on error, |
282 | calls the callback without the actual number of bytes read (or -1 on |
283 | just like the syscall). |
283 | error, just like the syscall). |
|
|
284 | |
|
|
285 | "aio_read" will, like "sysread", shrink or grow the $data scalar to |
|
|
286 | offset plus the actual number of bytes read. |
284 | |
287 | |
285 | If $offset is undefined, then the current file descriptor offset |
288 | If $offset is undefined, then the current file descriptor offset |
286 | will be used (and updated), otherwise the file descriptor offset |
289 | will be used (and updated), otherwise the file descriptor offset |
287 | will not be changed by these calls. |
290 | will not be changed by these calls. |
288 | |
291 | |