Hi Duncan,

I'm following the story regarding (parallel) GC in this example
with interest, but forgive me if I ask a more minor question
regarding your modification of an extra parameter, "n", to
"heavytask". Does this really help (to ensure that each core
does work independently)? Surely, with fibs now described in a
where clause, the "0:1:etc." form would not be shared among the
(8) instantiations of "heavytask"?

> heavytask m n = putMVar m $! (fibs !! 100000)
>   where
>     fibs = n : (n+1) : zipWith (+) fibs (tail fibs)

Regards,
Paul





_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to