… | |
… | |
27 | \&IO::AIO::poll_cb; |
27 | \&IO::AIO::poll_cb; |
28 | |
28 | |
29 | # Tk |
29 | # Tk |
30 | Tk::Event::IO->fileevent (IO::AIO::poll_fileno, "", |
30 | Tk::Event::IO->fileevent (IO::AIO::poll_fileno, "", |
31 | readable => \&IO::AIO::poll_cb); |
31 | readable => \&IO::AIO::poll_cb); |
|
|
32 | |
|
|
33 | # Danga::Socket |
|
|
34 | Danga::Socket->AddOtherFds (IO::AIO::poll_fileno => |
|
|
35 | \&IO::AIO::poll_cb); |
|
|
36 | |
32 | |
37 | |
33 | =head1 DESCRIPTION |
38 | =head1 DESCRIPTION |
34 | |
39 | |
35 | This module implements asynchronous I/O using whatever means your |
40 | This module implements asynchronous I/O using whatever means your |
36 | operating system supports. |
41 | operating system supports. |
… | |
… | |
228 | Example: wait till there are no outstanding requests anymore: |
233 | Example: wait till there are no outstanding requests anymore: |
229 | |
234 | |
230 | IO::AIO::poll_wait, IO::AIO::poll_cb |
235 | IO::AIO::poll_wait, IO::AIO::poll_cb |
231 | while IO::AIO::nreqs; |
236 | while IO::AIO::nreqs; |
232 | |
237 | |
|
|
238 | =item IO::AIO::flush |
|
|
239 | |
|
|
240 | Wait till all outstanding AIO requests have been handled. |
|
|
241 | |
233 | =item IO::AIO::min_parallel $nthreads |
242 | =item IO::AIO::min_parallel $nthreads |
234 | |
243 | |
235 | Set the minimum number of AIO threads to C<$nthreads>. The default is |
244 | Set the minimum number of AIO threads to C<$nthreads>. The default is |
236 | C<1>, which means a single asynchronous operation can be done at one time |
245 | C<1>, which means a single asynchronous operation can be done at one time |
237 | (the number of outstanding operations, however, is unlimited). |
246 | (the number of outstanding operations, however, is unlimited). |