문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top