[Haskell-cafe] Re: Parallel combinator, performance advice
bulat.ziganshin at gmail.com
Tue Apr 7 11:40:37 EDT 2009
Tuesday, April 7, 2009, 6:13:29 PM, you wrote:
> Calls to System.Cmd.system, i.e. running external console processes.
> It's a make system I'm writing, so virtually all the time is spent in
> calls to ghc etc.
btw, if all that you need is to limit amount of simultaneous
System.Cmd.system calls, you may go from opposite side: wrap this call
sem = unsafePerformIO$ newQSem numCapabilities
mysystem = bracket_ (waitQSem sem) (signalQSem sem) . system
and implement para as simple thread population:
para = mapM_ forkIO
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe