… | |
… | |
23 | use base 'Exporter'; |
23 | use base 'Exporter'; |
24 | |
24 | |
25 | BEGIN { |
25 | BEGIN { |
26 | $VERSION = 0.002; |
26 | $VERSION = 0.002; |
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 | } |
… | |
… | |
69 | =item aio_open($pathname, $flags, $mode, $callback) |
69 | =item aio_open($pathname, $flags, $mode, $callback) |
70 | |
70 | |
71 | Asynchronously open or create a file and call the callback with the |
71 | Asynchronously open or create a file and call the callback with the |
72 | filedescriptor. |
72 | filedescriptor. |
73 | |
73 | |
|
|
74 | =item aio_close($fh, $callback) |
|
|
75 | |
|
|
76 | Asynchronously close a file and call the callback with the result code. |
|
|
77 | |
74 | =cut |
78 | =cut |
75 | |
79 | |
76 | END { |
80 | END { |
77 | max_parallel 0; |
81 | max_parallel 0; |
78 | } |
82 | } |