Questions about Stream/Iterable/Files - and possibly the compiler

Paul Sandoz paul.sandoz at oracle.com
Mon Nov 9 09:35:47 UTC 2015


> On 7 Nov 2015, at 00:16, Peter Levart <peter.levart at gmail.com> wrote:
> 
> 
> 
> On 11/07/2015 12:02 AM, Peter Levart wrote:
>> How would you otherwise write a parallel stream into a file if it was not by using a Collector? Would you make it serial 1st?
> 
> Ah, yes. forEachOrdered() !
> 

Exactly! triggering a forEachOrdered action on Collectors using a special characteristic is not trivial because any such characteristic needs to be back propagated up to the root collector. I have not thought about it in great detail but it may well be a non-compatible change as existing collectors would need to be updated.

Paul.



More information about the core-libs-dev mailing list