[Haskell-cafe] Re[2]: Parallel combinator, performance advice
Bulat Ziganshin
bulat.ziganshin at gmail.com
Tue Apr 7 11:40:37 EDT 2009
Hello Neil,
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
into semaphore:
sem = unsafePerformIO$ newQSem numCapabilities
mysystem = bracket_ (waitQSem sem) (signalQSem sem) . system
and implement para as simple thread population:
para = mapM_ forkIO
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list