Class ThreadUtils


  • public class ThreadUtils
    extends Object
    Helper class to parallelize over the two sides of a BinaryTransformation
    Author:
    Valentino Pinna
    • Method Detail

      • evalFuture

        @SafeVarargs
        public static <T> SerFunction<Transformation,​T> evalFuture​(BinaryOperator<T> combiner,
                                                                         SerFunction<? super Transformation,​T>... extractors)
        Type Parameters:
        T - The type returned by the extractor
        Parameters:
        extractors - functions that extracts the results of each subexpression
        combiner - an associative function that reduces the results of the subexpressions
        Returns:
        the result of the computation