[Haskell-cafe] Re[10]: Parallel combinator, performance advice

Bulat Ziganshin bulat.ziganshin at gmail.com
Wed Apr 8 07:33:17 EDT 2009


Hello Neil,

Wednesday, April 8, 2009, 3:25:51 PM, you wrote:

> I've attached a revised implementation. With my benchmark it gives a
> stack overflow:

it may be in replicate. check with

let incRef = atomicModifyIORef r (\a -> (a,a))

> As a side note, it's necessary to add parallelStop, to kill all the
> threads - or you get thread blocked exceptions being raised.

alternatively, you can catch this exception in addWorker

-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list