… | |
… | |
1500 | aio_stat [$etcdir, "passwd"], sub { |
1500 | aio_stat [$etcdir, "passwd"], sub { |
1501 | # yay |
1501 | # yay |
1502 | }; |
1502 | }; |
1503 | }; |
1503 | }; |
1504 | |
1504 | |
1505 | That C<aio_wd> is a request and not a normal function shows that creating |
1505 | The fact that C<aio_wd> is a request and not a normal function shows that |
1506 | an IO::AIO::WD object is itself a potentially blocking operation, which is |
1506 | creating an IO::AIO::WD object is itself a potentially blocking operation, |
1507 | why it is done asynchronously. |
1507 | which is why it is done asynchronously. |
1508 | |
1508 | |
1509 | To stat the directory obtained with C<aio_wd> above, one could write |
1509 | To stat the directory obtained with C<aio_wd> above, one could write |
1510 | either of the following three request calls: |
1510 | either of the following three request calls: |
1511 | |
1511 | |
1512 | aio_lstat "/etc" , sub { ... # pathname as normal string |
1512 | aio_lstat "/etc" , sub { ... # pathname as normal string |