--- IO-AIO/AIO.pm 2006/10/24 03:17:39 1.68 +++ IO-AIO/AIO.pm 2006/10/24 03:40:25 1.69 @@ -135,6 +135,25 @@ The priority will be reset to C<0> after each call to one of the C functions. +Example: open a file with low priority, then read something from it with +higher priority so the read request is serviced before other low priority +open requests (potentially spamming the cache): + + aioreq_pri -3; + aio_open ..., sub { + return unless $_[0]; + + aioreq_pri -2; + aio_read $_[0], ..., sub { + ... + }; + }; + +=item aioreq_nice $pri_adjust + +Similar to C, but subtracts the given value from the current +priority, so effects are cumulative. + =item aio_open $pathname, $flags, $mode, $callback->($fh) Asynchronously open or create a file and call the callback with a newly