View Source elvis_task (elvis_core v3.1.0)

Link to this section Summary

Functions

chunk_fold evaluates apply(Module, Function, [Elem|ExtrArgs]) for every element Elem in JobItemList in parallel with max concurrcy factor equal to Concurrency. On successful evaluation FunAcc function is called with the result of successful execution as a first parameter and accumulator as a second parameter.

Link to this section Functions

Link to this function

chunk_fold(FunWork, FunAcc, InitialAcc, ExtraArgs, JoinItemList, Concurrency)

View Source
-spec chunk_fold(FunWork :: {Module :: module(), Function :: atom()},
           FunAcc :: fun((NewElem :: term(), Acc :: term()) -> Acc :: term()),
           InitialAcc :: term(),
           ExtraArgs :: list(),
           JoinItemList :: list(),
           Concurrency :: non_neg_integer()) ->
              {ok, FinalAcc :: term()} | {error, term()}.
chunk_fold evaluates apply(Module, Function, [Elem|ExtrArgs]) for every element Elem in JobItemList in parallel with max concurrcy factor equal to Concurrency. On successful evaluation FunAcc function is called with the result of successful execution as a first parameter and accumulator as a second parameter.