[Haskell-cafe] Re: Waiting for thread to finish

Andrew Coppin andrewcoppin at btinternet.com
Wed Nov 28 16:28:03 EST 2007


Dan Weston wrote:
> Silly or not, if I compile with -threaded, I always link in the 
> one-liner C file:
>
>   char *ghc_rts_opts = "-N2";
>
> so I don't have to remember at runtime whether it should run with 2 
> cores or not. This just changes the default to 2 cores, so I am still 
> free to run on only one core with the runtime flags +RTS -N1, though I 
> rarely need to.
>
> http://www.haskell.org/ghc/docs/latest/html/users_guide/runtime-control.html#rts-hooks 
>

Ah... you learn something useful every day! I was going to ask on IRC 
whether there's any way to do this - but now I don't need to bother. :-)



More information about the Haskell-Cafe mailing list