Async-Util
view release on metacpan or search on metacpan
The C<at_a_time> argument sets the maximum number of inputs that will be
processed simultaneously. This defaults to 100.
When the action has been applied to each input then the C<cb> coderef is
invoked and passed an arrayref containing one result for every input. If
action ever passes an error to its callback then the cb coderef is immediately
invoked and passed the error. No more inputs are processed.
=head2 azipmap
C<azipmap> executes a list of callbacks on a list of corresponding inputs.
Every provided action is executed and passed the input found in the same
position in the list of provided inputs. In other words, the list of actions
and the list of inputs are zipped in to action/input pairs, then each action
is executed on its input.
azipmap(
inputs => <ARRAY_REF>,
actions => <CODE_REF>,
cb => <CODE_REF>,
at_a_time => <INTEGER>, # defaults to 100
lib/Async/Util.pm view on Meta::CPAN
The C<at_a_time> argument sets the maximum number of inputs that will be
processed simultaneously. This defaults to 100.
When the action has been applied to each input then the C<cb> coderef is
invoked and passed an arrayref containing one result for every input. If
action ever passes an error to its callback then the cb coderef is immediately
invoked and passed the error. No more inputs are processed.
=head2 azipmap
C<azipmap> executes a list of callbacks on a list of corresponding inputs.
Every provided action is executed and passed the input found in the same
position in the list of provided inputs. In other words, the list of actions
and the list of inputs are zipped in to action/input pairs, then each action
is executed on its input.
azipmap(
inputs => <ARRAY_REF>,
actions => <CODE_REF>,
cb => <CODE_REF>,
at_a_time => <INTEGER>, # defaults to 100
( run in 0.625 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )