Infinite parallel stream

Boaz Nahum boaznahum at gmail.com
Tue Apr 30 09:03:29 PDT 2013


I see. Thank
On Apr 30, 2013 4:21 PM, "Paul Sandoz" <paul.sandoz at oracle.com> wrote:

>
> On Apr 30, 2013, at 3:07 PM, Boaz Nahum <boaznahum at gmail.com> wrote:
>
> > Thank so much
> >
> > >2) !ORDERED
> >
> >  infiniteStream.filter( .. reject 99.9% ... ).limit(100)
> >
> > What is the global limit count in this case ?
>
> 100.
>
> I meant "global" w.r.t. the F/J tasks of the limit operation.
>
> Each time a F/J leaf task traverses an element it would decrement, safely,
> the global limit count. So when that count reaches zero (or traversal
> terminates normally) leaf tasks can complete, and further tasks, if any, to
> be created can be cancelled.
>
> Paul.
>
>
>


More information about the lambda-dev mailing list