… | |
… | |
21 | package Linux::AIO; |
21 | package Linux::AIO; |
22 | |
22 | |
23 | use base 'Exporter'; |
23 | use base 'Exporter'; |
24 | |
24 | |
25 | BEGIN { |
25 | BEGIN { |
26 | $VERSION = 0.002; |
26 | $VERSION = 0.011; |
27 | |
27 | |
28 | @EXPORT = qw(aio_read aio_write aio_open aio_close); |
28 | @EXPORT = qw(aio_read aio_write aio_open aio_close); |
29 | @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel nreqs); |
29 | @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel nreqs); |
30 | |
30 | |
31 | require XSLoader; |
31 | require XSLoader; |
… | |
… | |
58 | =item Linux::AIO::nreqs |
58 | =item Linux::AIO::nreqs |
59 | |
59 | |
60 | Returns the number of requests currently outstanding. |
60 | Returns the number of requests currently outstanding. |
61 | |
61 | |
62 | =item aio_read($fh,$offset,$length, $data,$dataoffset,$callback) |
62 | =item aio_read($fh,$offset,$length, $data,$dataoffset,$callback) |
|
|
63 | |
63 | aio_write($fh,$offset,$length, $data,$dataoffset,$callback) |
64 | =item aio_write($fh,$offset,$length, $data,$dataoffset,$callback) |
64 | |
65 | |
65 | Reads or writes C<length> bytes from the specified C<fh> and C<offset> |
66 | Reads or writes C<length> bytes from the specified C<fh> and C<offset> |
66 | into the scalar given by C<data> and offset C<dataoffset> and calls the |
67 | into the scalar given by C<data> and offset C<dataoffset> and calls the |
67 | callback without the actual number of bytes read (or undef on error). |
68 | callback without the actual number of bytes read (or undef on error). |
68 | |
69 | |
… | |
… | |
87 | |
88 | |
88 | =head1 BUGS |
89 | =head1 BUGS |
89 | |
90 | |
90 | This module has not yet been extensively tested. Watch out! |
91 | This module has not yet been extensively tested. Watch out! |
91 | |
92 | |
|
|
93 | - aio_stat/lstat are seriously missing here. |
|
|
94 | |
92 | =head1 SEE ALSO |
95 | =head1 SEE ALSO |
93 | |
96 | |
94 | L<Coro>. |
97 | L<Coro>. |
95 | |
98 | |
96 | =head1 AUTHOR |
99 | =head1 AUTHOR |