Infinite parallel stream (original) (raw)
Paul Sandoz paul.sandoz at oracle.com
Tue Apr 30 06:20:56 PDT 2013
- Previous message: Infinite parallel stream
- Next message: Infinite parallel stream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 ?
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.
- Previous message: Infinite parallel stream
- Next message: Infinite parallel stream
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]