Brian Goetz brian.goetz at
Fri Feb 1 07:33:51 PST 2013

It "just works", but it doesn't try to split ;)

Spliterator is NOT a parallel execution framework.  It is the low-level 
adapter type that lets an arbitrary data structure (array, List, 
whatever) feed data into a parallel execution framework.  Think of it as 
the parallel analogue of Iterator, but the framework has to decide when 
to split.

Spliterator is not meant for most devs to use; only for developers of 
library-based aggregates.  EVeryone else will do:


and get what you are looking for.

On 2/1/2013 10:14 AM, Luc Duponcheel wrote:
> Hello,
> I have a (hopefully) very simple question about spliterators
> consider something like
>    Spliterator<Integer> spliterator =
>     // ... make a spliterator
>    spliterator.forEach(integer ->
>      new Integer(integer.intValue() + 1)
>     );
> does the foreach method "just work"
> (I mean: will it try to split)
> or do I somehow have to invoke the trySplit() method myself
> thx
> Luc

More information about the lambda-dev mailing list