--- IO-AIO/bin/treescan 2011/09/27 12:12:55 1.8 +++ IO-AIO/bin/treescan 2011/09/30 00:23:44 1.9 @@ -45,15 +45,16 @@ $path .= "/"; + IO::AIO::poll_cb; + aioreq_pri -1; aio_scandir $path, 8, sub { - my ($dirs, $files) = @_; + my ($dirs, $files) = @_ + or warn "$path: $!\n"; printfn "", [$path] unless $opt_nodirs; printfn $path, $files unless $opt_nofiles; - IO::AIO::poll_cb; - if ($opt_stat) { aio_wd $path, sub { my $wd = shift; @@ -66,7 +67,7 @@ }; } -IO::AIO::max_outstanding 400; # two fds per directory, so limit accordingly +IO::AIO::max_outstanding 100; # two fds per directory, so limit accordingly IO::AIO::min_parallel 20; for my $seed (@ARGV) {