Re: OpenJDK8: java.util.stream.Stream.onClose

2016-01-25 Thread Paul Sandoz
> On 23 Jan 2016, at 10:50, Timo Kinnunen 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

RE: OpenJDK8: java.util.stream.Stream.onClose

2016-01-23 Thread Timo Kinnunen
: Paul Sandoz Sent: Friday, January 22, 2016 18:45 Cc: core-libs-dev Libs Subject: Re: OpenJDK8: java.util.stream.Stream.onClose Hi Carsten, If you read the documentation further on down it states: * first exception, since an exception cannot suppress itself.) May * return itself. The same applies

OpenJDK8: java.util.stream.Stream.onClose

2016-01-22 Thread Carsten Varming
Dear core-libs-devs, I was playing around with streams and onClose and ran into an example with odd behavior (well, I found it odd, see example below). I was wondering if you could point me to prior discussions on semantics of intermediate operations and the semantics of Stream.onClose. A bit of

Re: OpenJDK8: java.util.stream.Stream.onClose

2016-01-22 Thread Paul Sandoz
Hi Carsten, If you read the documentation further on down it states: * first exception, since an exception cannot suppress itself.) May * return itself. The same applies to parallel/sequential/unordered. For these cases it would be rather inefficient to create new stages in the pipeline, for