Expand description
Ordered, bounded-concurrency parallel map/reduce with a configurable failure policy.
Graph Send fanout is the low-level primitive for parallel supersteps, but
callers frequently want a reusable “run these N items concurrently and
reduce the results” helper with deterministic input-order results, a
concurrency cap, per-item success/failure isolation, and a policy for what to
do when some items fail (fail-fast, collect-all, quorum, best-effort). That
is what map_reduce provides, independent of the graph executor.
Results are always returned in input order even though items complete out
of order: concurrency is driven by
buffer_unordered, which
yields items as they finish, and each future carries its input index so the
completed results are re-sorted into input-order slots before being returned.
Structs§
- Item
Outcome - The outcome of one item in a parallel map/reduce, tagged with its input index so callers can correlate results back to inputs.
- Parallel
Options - Options controlling parallel execution.
- Parallel
Outcome - The collected result of a parallel map/reduce, preserving input order.
Enums§
- Failure
Policy - What
map_reducedoes when some items fail.
Functions§
- map_
reduce - Runs
foveritemsconcurrently (bounded byParallelOptions::max_concurrency), collecting per-item outcomes in input order and applying the configuredFailurePolicy.