ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Linux-AIO/AIO.pm
(Generate patch)

Comparing Linux-AIO/AIO.pm (file contents):
Revision 1.4 by root, Thu Aug 16 02:43:45 2001 UTC vs.
Revision 1.9 by root, Sun Feb 10 19:25:08 2002 UTC

21package Linux::AIO; 21package Linux::AIO;
22 22
23use base 'Exporter'; 23use base 'Exporter';
24 24
25BEGIN { 25BEGIN {
26 $VERSION = 0.002; 26 $VERSION = 0.011;
27 27
28 @EXPORT = qw(aio_read aio_write aio_open); 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;
32 XSLoader::load Linux::AIO, $VERSION; 32 XSLoader::load Linux::AIO, $VERSION;
33} 33}
58=item Linux::AIO::nreqs 58=item Linux::AIO::nreqs
59 59
60Returns the number of requests currently outstanding. 60Returns 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
63aio_write($fh,$offset,$length, $data,$dataoffset,$callback) 64=item aio_write($fh,$offset,$length, $data,$dataoffset,$callback)
64 65
65Reads or writes C<length> bytes from the specified C<fh> and C<offset> 66Reads or writes C<length> bytes from the specified C<fh> and C<offset>
66into the scalar given by C<data> and offset C<dataoffset> and calls the 67into the scalar given by C<data> and offset C<dataoffset> and calls the
67callback without the actual number of bytes read (or undef on error). 68callback without the actual number of bytes read (or undef on error).
68 69
69=item aio_open($pathname, $flags, $mode, $callback) 70=item aio_open($pathname, $flags, $mode, $callback)
70 71
71Asynchronously open or create a file and call the callback with the 72Asynchronously open or create a file and call the callback with the
72filedescriptor. 73filedescriptor.
74
75=item aio_close($fh, $callback)
76
77Asynchronously close a file and call the callback with the result code.
73 78
74=cut 79=cut
75 80
76END { 81END {
77 max_parallel 0; 82 max_parallel 0;
83 88
84=head1 BUGS 89=head1 BUGS
85 90
86This module has not yet been extensively tested. Watch out! 91This module has not yet been extensively tested. Watch out!
87 92
93 - aio_stat/lstat are seriously missing here.
94
88=head1 SEE ALSO 95=head1 SEE ALSO
89 96
90L<Coro>. 97L<Coro>.
91 98
92=head1 AUTHOR 99=head1 AUTHOR

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines