[Haskell-cafe] Re: Re: Parallel combinator, performance advice
ndmitchell at gmail.com
Wed Apr 8 08:28:48 EDT 2009
>> I've attached a revised implementation. With my benchmark it gives a
>> stack overflow:
> let incRef = atomicModifyIORef r (\a -> (a,a))
That was the problem, I now no longer get a stack overflow.
>> 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
I could, but it wouldn't be that easy to tell if the reason for the
deadlock was the program finishing a real deadlock occurring in the
system. I'd rather not catch exceptions where possible.
More information about the Haskell-Cafe