… | |
… | |
2008 | This is a very bad function to use in interactive programs because it |
2008 | This is a very bad function to use in interactive programs because it |
2009 | blocks, and a bad way to reduce concurrency because it is inexact: Better |
2009 | blocks, and a bad way to reduce concurrency because it is inexact: Better |
2010 | use an C<aio_group> together with a feed callback. |
2010 | use an C<aio_group> together with a feed callback. |
2011 | |
2011 | |
2012 | Its main use is in scripts without an event loop - when you want to stat |
2012 | Its main use is in scripts without an event loop - when you want to stat |
2013 | a lot of files, you can write somehting like this: |
2013 | a lot of files, you can write something like this: |
2014 | |
2014 | |
2015 | IO::AIO::max_outstanding 32; |
2015 | IO::AIO::max_outstanding 32; |
2016 | |
2016 | |
2017 | for my $path (...) { |
2017 | for my $path (...) { |
2018 | aio_stat $path , ...; |
2018 | aio_stat $path , ...; |