Is there an IO action that gives me the number of OS threads the RTS was initialized with? It would be nice to be able to use this as an argument to the parBuffer function from the Control.Parallel.Strategies module.
+4
A:
Assuming GHC, you could use GHC.Conc.numCapabilities
to get the argument to +RTS -N
.
KennyTM
2010-10-28 19:36:56
Exactly what I was looking for. (I am using GHC.) Thanks!
Edward Amsden
2010-10-28 20:24:21