"Cancelable" streams
Remi Forax
forax at univ-mlv.fr
Sat Dec 8 15:03:27 PST 2012
On 12/08/2012 11:54 PM, Brian Goetz wrote:
>>> Parallel limit has some serious limitations that make it pretty
>>> unsuitable for this case. While these may be fixable, the effort and
>>> distortion involved is far, far greater than what is being suggested
>>> here. In fact, I'm on the fence about whether to keep limit at all in
>>> its current state; I worry people will expect more of it than it can
>>> deliver, and be unhappy.
>>
>> I don't get it. You can check the limit the very same way you want to
>> check shouldCancel.
>
> Only in the serial case (easy) or in the parallel case where we know
> that we don't have to respect encounter order. But in the general
> case, encounter order is significant (consider a reduce with an
> associative but not commutative reducing function), you can't just
> send the first N that you happen to find through. limit(n) must send
> the first N in the *encounter order* in this case. This is where the
> pain and complexity comes from.
>
that's why we have unordered()
Rémi
More information about the lambda-libs-spec-observers
mailing list