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.
Assuming GHC, you could use GHC.Conc.numCapabilities
to get the argument to +RTS -N
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With