OpenJDK8: java.util.stream.Stream.onClose

Paul Sandoz paul.sandoz at oracle.com
Mon Jan 25 08:43:13 UTC 2016


> On 23 Jan 2016, at 10:50, Timo Kinnunen <timo.kinnunen at gmail.com> wrote:
> 
> Hi,
> 
> The pipeline stages don’t really need to mutate themselves (as they can mutate the Stream if needed). So they should be shareable between Streams, alleviating some of cost of creating new copies of a Stream, right?

Yes, we want to avoid creating new stages (Stream instances) in the pipeline for stuff that can be associated more efficiently as state of the pipeline (attached to the head)

Paul.



More information about the core-libs-dev mailing list