parallelAcceptAll

fun <T> List<Node>.parallelAcceptAll(visitor: NodeVisitor<T>, minItems: Int = 50): List<T>

Accepts a visitor for each node, executing visits in parallel when beneficial. Falls back to sequential execution for small lists.

Return

the list of results from each visit, preserving order

Parameters

visitor

the visitor to accept

minItems

minimum number of nodes required for parallel execution

See also