[Haskell-cafe] Go parallel

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Mon Nov 5 23:58:55 EST 2007

On Nov 5, 2007, at 15:46 , Andrew Coppin wrote:

>> You can spark a thread for each computation of fn, like such:
>> writeArray framebuffer p `parApp` fn p
>> where
>>   parApp f x = x `par` f x
> Hmm, that may be a little *too* fine-grained. (But then, just  
> because I spark 175,862 threads doesn't mean it will actually *run*  
> that many at once, right?) I guess I'll try it and see...

As I understand it, the GHC "spark" implementation is specifically  
designed to support the case of making lots of sparks and letting the  
runtime schedule them to threads.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list