On Wed, Aug 31, 2011 at 03:39, Eric Y. Kow <e...@well-typed.com> wrote:

> (Food for thought: why `parList rseq` instead of `parList r0`?
> Reply to the Haskell-Cafe posting if you think you know why!)
>

Because with `r0` you're liable to just parallel evaluate to the thunk
containing the computation you're trying to parallelize, and the actual
computation then takes place later *outside* the parallel section?  (That
is, what comes out of parList is a list of the thunks passed to `r0`,
otherwise unevaluated.  You wrapped them in an `id` and then parallel
evaluated the `id` away, real useful that. :)  You need to go at least to
WHNF, then it comes down to the strictness specified in what's passed to
`rseq`.

-- 
brandon s allbery                                      allber...@gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to