… | |
… | |
206 | |
206 | |
207 | our @EXPORT = (@AIO_REQ, qw(aioreq_pri aioreq_nice)); |
207 | our @EXPORT = (@AIO_REQ, qw(aioreq_pri aioreq_nice)); |
208 | our @EXPORT_OK = qw(poll_fileno poll_cb poll_wait flush |
208 | our @EXPORT_OK = qw(poll_fileno poll_cb poll_wait flush |
209 | min_parallel max_parallel max_idle |
209 | min_parallel max_parallel max_idle |
210 | nreqs nready npending nthreads |
210 | nreqs nready npending nthreads |
211 | max_poll_time max_poll_reqs); |
211 | max_poll_time max_poll_reqs |
|
|
212 | sendfile fadvise); |
212 | |
213 | |
213 | push @AIO_REQ, qw(aio_busy); # not exported |
214 | push @AIO_REQ, qw(aio_busy); # not exported |
214 | |
215 | |
215 | @IO::AIO::GRP::ISA = 'IO::AIO::REQ'; |
216 | @IO::AIO::GRP::ISA = 'IO::AIO::REQ'; |
216 | |
217 | |
… | |
… | |
1394 | Returns the number of requests currently in the pending state (executed, |
1395 | Returns the number of requests currently in the pending state (executed, |
1395 | but not yet processed by poll_cb). |
1396 | but not yet processed by poll_cb). |
1396 | |
1397 | |
1397 | =back |
1398 | =back |
1398 | |
1399 | |
|
|
1400 | =head3 MISCELLANEOUS FUNCTIONS |
|
|
1401 | |
|
|
1402 | IO::AIO implements some functions that might be useful, but are not |
|
|
1403 | asynchronous. |
|
|
1404 | |
|
|
1405 | =over 4 |
|
|
1406 | |
|
|
1407 | =item IO::AIO::sendfile $ofh, $ifh, $offset, $count |
|
|
1408 | |
|
|
1409 | Calls the C<eio_sendfile_sync> function, which is like C<aio_sendfile>, |
|
|
1410 | but is blocking (this makes most sense if you know the input data is |
|
|
1411 | likely cached already and the output filehandle is set to non-blocking |
|
|
1412 | operations). |
|
|
1413 | |
|
|
1414 | Returns the number of bytes copied, or C<-1> on error. |
|
|
1415 | |
|
|
1416 | =item IO::AIO::fadvise $fh, $offset, $len, $advice |
|
|
1417 | |
|
|
1418 | Simply calls the C<posix_fadvise> function (see it's |
|
|
1419 | manpage for details). The following advice constants are |
|
|
1420 | avaiable: C<IO::AIO::FADV_NORMAL>, C<IO::AIO::FADV_SEQUENTIAL>, |
|
|
1421 | C<IO::AIO::FADV_RANDOM>, C<IO::AIO::FADV_NOREUSE>, |
|
|
1422 | C<IO::AIO::FADV_WILLNEED>, C<IO::AIO::FADV_DONTNEED>. |
|
|
1423 | |
|
|
1424 | On systems that do not implement C<posix_fadvise>, this function returns |
|
|
1425 | ENOSYS, otherwise the return value of C<posix_fadvise>. |
|
|
1426 | |
|
|
1427 | =back |
|
|
1428 | |
1399 | =cut |
1429 | =cut |
1400 | |
1430 | |
1401 | min_parallel 8; |
1431 | min_parallel 8; |
1402 | |
1432 | |
1403 | END { flush } |
1433 | END { flush } |