… | |
… | |
32 | package Linux::AIO; |
32 | package Linux::AIO; |
33 | |
33 | |
34 | use base 'Exporter'; |
34 | use base 'Exporter'; |
35 | |
35 | |
36 | BEGIN { |
36 | BEGIN { |
37 | $VERSION = 1.2; |
37 | $VERSION = 1.41; |
38 | |
38 | |
39 | @EXPORT = qw(aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink); |
39 | @EXPORT = qw(aio_read aio_write aio_open aio_close aio_stat aio_lstat aio_unlink); |
40 | @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel nreqs); |
40 | @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel nreqs); |
41 | |
41 | |
42 | require XSLoader; |
42 | require XSLoader; |
… | |
… | |
70 | |
70 | |
71 | Event->io (fd => Linux::AIO::poll_fileno, |
71 | Event->io (fd => Linux::AIO::poll_fileno, |
72 | poll => 'r', async => 1, |
72 | poll => 'r', async => 1, |
73 | cb => \&Linux::AIO::poll_cb ); |
73 | cb => \&Linux::AIO::poll_cb ); |
74 | |
74 | |
75 | |
|
|
76 | =item Linux::AIO::nreqs |
75 | =item Linux::AIO::nreqs |
77 | |
76 | |
78 | Returns the number of requests currently outstanding. |
77 | Returns the number of requests currently outstanding. |
79 | |
78 | |
80 | =item aio_open $pathname, $flags, $mode, $callback |
79 | =item aio_open $pathname, $flags, $mode, $callback |
… | |
… | |
107 | error when stat'ing a large file, the results will be silently truncated |
106 | error when stat'ing a large file, the results will be silently truncated |
108 | unless perl itself is compiled with large file support. |
107 | unless perl itself is compiled with large file support. |
109 | |
108 | |
110 | =item aio_unlink $pathname, $callback |
109 | =item aio_unlink $pathname, $callback |
111 | |
110 | |
112 | Asynchronously unlink a file |
111 | Asynchronously unlink a file. |
113 | |
112 | |
114 | =cut |
113 | =cut |
115 | |
114 | |
116 | min_parallel 1; |
115 | min_parallel 1; |
117 | |
116 | |
… | |
… | |
134 | |
133 | |
135 | L<Coro>. |
134 | L<Coro>. |
136 | |
135 | |
137 | =head1 AUTHOR |
136 | =head1 AUTHOR |
138 | |
137 | |
139 | Marc Lehmann <pcg@goof.com> |
138 | Marc Lehmann <schmorp@schmorp.de> |
140 | http://www.goof.com/pcg/marc/ |
139 | http://home.schmorp.de/ |
141 | |
140 | |
142 | =cut |
141 | =cut |
143 | |
142 | |