… | |
… | |
68 | =head2 EXAMPLE |
68 | =head2 EXAMPLE |
69 | |
69 | |
70 | This is a simple example that uses the EV module and loads |
70 | This is a simple example that uses the EV module and loads |
71 | F</etc/passwd> asynchronously: |
71 | F</etc/passwd> asynchronously: |
72 | |
72 | |
73 | use Fcntl; |
|
|
74 | use EV; |
73 | use EV; |
75 | use IO::AIO; |
74 | use IO::AIO; |
76 | |
75 | |
77 | # register the IO::AIO callback with EV |
76 | # register the IO::AIO callback with EV |
78 | my $aio_w = EV::io IO::AIO::poll_fileno, EV::READ, \&IO::AIO::poll_cb; |
77 | my $aio_w = EV::io IO::AIO::poll_fileno, EV::READ, \&IO::AIO::poll_cb; |
… | |
… | |
2117 | =item IO::AIO::tee $r_fh, $w_fh, $length, $flags |
2116 | =item IO::AIO::tee $r_fh, $w_fh, $length, $flags |
2118 | |
2117 | |
2119 | Calls the GNU/Linux C<tee(2)> syscall, see it's manpage and the |
2118 | Calls the GNU/Linux C<tee(2)> syscall, see it's manpage and the |
2120 | description for C<IO::AIO::splice> above for details. |
2119 | description for C<IO::AIO::splice> above for details. |
2121 | |
2120 | |
|
|
2121 | =item $actual_size = IO::AIO::pipesize $r_fh[, $new_size] |
|
|
2122 | |
|
|
2123 | Attempts to query or change the pipe buffer size. Obviously works only |
|
|
2124 | on pipes, and currently works only on GNU/Linux systems, and fails with |
|
|
2125 | C<-1>/C<ENOSYS> everywhere else. If anybody knows how to influence pipe buffer |
|
|
2126 | size on other systems, drop me a note. |
|
|
2127 | |
2122 | =back |
2128 | =back |
2123 | |
2129 | |
2124 | =cut |
2130 | =cut |
2125 | |
2131 | |
2126 | min_parallel 8; |
2132 | min_parallel 8; |