infinite.parallel().sequential().iterator() -> OOM
Brian Goetz
brian.goetz at oracle.com
Mon Dec 24 09:31:43 PST 2012
Yeah, same issue -- sequential() on a parallel stream is a full barrier.
The right answer to this may well be to get rid of sequential(), which
is being discussed in the EG. We've found some ways to eliminate its
primary motivation.
On 12/24/2012 12:00 PM, Dmitry Bessonov wrote:
> Hello,
>
> Here's an issue similar to the one reported recently. For example:
>
> Streams.repeat("a").parallel().sequential().iterator();
>
> on b69 leads to something like
>
> Exception in thread "ForkJoinPool.commonPool-worker-7" Exception in
> thread "ForkJoinPool.commonPool-worker-3" Exception in thread
> "ForkJoinPool.commonPool-worker-1" Exception in thread
> "ForkJoinPool.commonPool-worker-3" java.lang.OutOfMemoryError: Java heap
> space
> java.lang.OutOfMemoryError: Java heap space
> java.lang.OutOfMemoryError: Java heap space
>
>
> -Dmitry
>
More information about the lambda-dev
mailing list