Rune Nielsen wrote:It seems to me, that the book mixes up concurrent and parallel reduction. As I read the JavaDoc, a reduction can be parallel without being concurrent, whereas a concurrent reduction is always parallel.
Scott Selikoff wrote:I think this sentence summarizes the discussion nicely. This seems to be a semantic argument to me. Generally speaking, concurrent and parallel are often used interchangeably. Yes, you can have a parallel stream with only one thread, but then it's not really behaving like a parallel stream; its behaving like a serial stream. Likewise, you can have a stream that you declared as parallel and expect to be performed concurrently, but some stream operations can force the stream to be processed in a single-threaded manner.