Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
parallel parallel
package com.theboreddev.parallelism;
import com.theboreddev.Processor;
import java.util.List;
public class ParallelProcessor implements Processor {
@Override
public Integer process(List<Integer> input) {
return input
.parallelStream()
.reduce(Integer::sum)
.orElse(0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.