… | |
… | |
79 | our $VERSION = '2.0'; |
79 | our $VERSION = '2.0'; |
80 | |
80 | |
81 | our @EXPORT = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat |
81 | our @EXPORT = qw(aio_sendfile aio_read aio_write aio_open aio_close aio_stat |
82 | aio_lstat aio_unlink aio_rmdir aio_readdir aio_scandir aio_symlink |
82 | aio_lstat aio_unlink aio_rmdir aio_readdir aio_scandir aio_symlink |
83 | aio_fsync aio_fdatasync aio_readahead aio_rename aio_link aio_move |
83 | aio_fsync aio_fdatasync aio_readahead aio_rename aio_link aio_move |
84 | aio_group); |
84 | aio_group aio_nop); |
85 | our @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs); |
85 | our @EXPORT_OK = qw(poll_fileno poll_cb min_parallel max_parallel max_outstanding nreqs); |
86 | |
86 | |
87 | @IO::AIO::GRP::ISA = 'IO::AIO::REQ'; |
87 | @IO::AIO::GRP::ISA = 'IO::AIO::REQ'; |
88 | |
88 | |
89 | require XSLoader; |
89 | require XSLoader; |
… | |
… | |
533 | add $grp |
533 | add $grp |
534 | (aio_stat ...), |
534 | (aio_stat ...), |
535 | (aio_stat ...), |
535 | (aio_stat ...), |
536 | ...; |
536 | ...; |
537 | |
537 | |
|
|
538 | =item aio_nop $callback->() |
|
|
539 | |
|
|
540 | This is a special request - it does nothing in itself and is only used for |
|
|
541 | side effects, such as when you want to add a dummy request to a group so |
|
|
542 | that finishing the requests in the group depends on executing the given |
|
|
543 | code. |
|
|
544 | |
|
|
545 | While this request does nothing, it still goes through the execution |
|
|
546 | phase and still requires a worker thread. Thus, the callback will not |
|
|
547 | be executed immediately but only after other requests in the queue have |
|
|
548 | entered their execution phase. This can be used to measure request |
|
|
549 | latency. |
|
|
550 | |
538 | =item IO::AIO::aio_sleep $fractional_seconds, $callback->() *NOT EXPORTED* |
551 | =item IO::AIO::aio_sleep $fractional_seconds, $callback->() *NOT EXPORTED* |
539 | |
552 | |
540 | Mainly used for debugging and benchmarking, this aio request puts one of |
553 | Mainly used for debugging and benchmarking, this aio request puts one of |
541 | the request workers to sleep for the given time. |
554 | the request workers to sleep for the given time. |
542 | |
555 | |