1 | =head1 NAME |
1 | =head1 NAME |
2 | |
2 | |
3 | IO::AIO - Asynchronous Input/Output |
3 | IO::AIO - Asynchronous/Advanced Input/Output |
4 | |
4 | |
5 | =head1 SYNOPSIS |
5 | =head1 SYNOPSIS |
6 | |
6 | |
7 | use IO::AIO; |
7 | use IO::AIO; |
8 | |
8 | |
… | |
… | |
57 | functions available on many operating systems. However, they are often |
57 | functions available on many operating systems. However, they are often |
58 | not well-supported or restricted (GNU/Linux doesn't allow them on normal |
58 | not well-supported or restricted (GNU/Linux doesn't allow them on normal |
59 | files currently, for example), and they would only support aio_read and |
59 | files currently, for example), and they would only support aio_read and |
60 | aio_write, so the remaining functionality would have to be implemented |
60 | aio_write, so the remaining functionality would have to be implemented |
61 | using threads anyway. |
61 | using threads anyway. |
|
|
62 | |
|
|
63 | In addition to asynchronous I/O, this module also exports some rather |
|
|
64 | arcane interfaces, such as C<madvise> or linux's C<splice> system call, |
|
|
65 | which is why the C<A> in C<AIO> can also mean I<advanced>. |
62 | |
66 | |
63 | Although the module will work in the presence of other (Perl-) threads, |
67 | Although the module will work in the presence of other (Perl-) threads, |
64 | it is currently not reentrant in any way, so use appropriate locking |
68 | it is currently not reentrant in any way, so use appropriate locking |
65 | yourself, always call C<poll_cb> from within the same thread, or never |
69 | yourself, always call C<poll_cb> from within the same thread, or never |
66 | call C<poll_cb> (or other C<aio_> functions) recursively. |
70 | call C<poll_cb> (or other C<aio_> functions) recursively. |