开发者

Get number of RTS threads in Haskell program?

开发者 https://www.devze.com 2023-01-23 01:21 出处:网络
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.Parall开发者

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.Parall开发者_高级运维el.Strategies module.


Assuming GHC, you could use GHC.Conc.numCapabilities to get the argument to +RTS -N.

0

精彩评论

暂无评论...
验证码 换一张
取 消