On Wed, 28 Sep 2022 15:36:50 GMT, Viktor Klang <d...@openjdk.org> wrote:

> This JavaDoc change attempts to shine some light on the `combiner`-function 
> as it relates to the third variant of `Stream.reduce` since it according to 
> the bug submission in JBS can be confusing that the `combiner` is not 
> mentioned in the code example in the documentation.

The current JavaDoc is not wrong :-) (same in other places). I think what you 
propose may not add much clarity (given the complexities of reasoning about 
parallelism).

We could add something after "but is not constrained to execute sequentially." 
e.g. 

"
Parallel execution may result in intermediate results computed as if by the 
code above. Such results are combined using the combining function to produce 
the final result."
"

-------------

PR: https://git.openjdk.org/jdk/pull/10469

Reply via email to