Java 8 introduced a lot of cool features, 1 of the most useful of which was the stream()
method. This nifty little method lets you treat an Iterable as a stream, enabling cool things like lambdas operating over a list. Related to stream()
is parallelStream()
. This lets you group your stream into smaller streams that are run in, you guessed it, parallel. Specifically, your data is processed in a thread pool the size of the number of cores on your machine, minus the one running your app. That’s a handy piece of information you’re going to want to keep in mind before you start throwing this nifty little call around in your code. Continue reading »
parallelStream() at your own risk
Java, Programming, Work
Comments Off on parallelStream() at your own risk
Jun 262017