Hello!

Probably additional clarifications should be added about Stream.concat
method (and primitive analogs). Currently it's unclear that the resulting
stream is actually the new pipeline, which do not propagate parallel status
to the concatenated streams. See also my StackOverflow question:
http://stackoverflow.com/q/30464397/4856258

Also things become more complex in JDK9 with the introduction of
takeWhile/dropWhile. For JDK Stream implementation these two are normal
intermediate operations, but if it happens that user has his own stream
implementation or delegate to JDK stream, then the default
takeWhile/dropWhile implementation is used which is actually starts new
pipeline at given point, so further changes of parallel/sequential mode are
not propagated to the initial pipeline. In my StreamEx library I call such
operations as "quasi-intermediate", and explicitly clarify this point. See
the JavaDoc:
http://amaembo.github.io/streamex/javadoc/javax/util/streamex/package-summary.html#StreamOps
Probably some clarification should be added to @implSpec section of
takeWhile/dropWhile.

With best regards,
Tagir Valeev.

On Sat, Aug 1, 2015 at 3:19 AM, Stuart Marks <stuart.ma...@oracle.com>
wrote:

> Hi all,
>
> The sequential() and parallel() methods on a stream set the execution mode
> for the entire pipeline. Unfortunately this isn't particularly clear from
> the documentation. This has been a recurring question. Please review this
> change to the java.util.stream package documentation to help clarify this
> point.
>
> I've also added a couple anchor tags that were missing from various
> sections.
>
> This is intended to be a purely editorial change, not a specification
> change.
>
> Bug:
>
>         https://bugs.openjdk.java.net/browse/JDK-8132800
>
> Webrev:
>
>         http://cr.openjdk.java.net/~smarks/reviews/8132800/webrev.0/
>
> Thanks,
>
> s'marks
>

Reply via email to