Detecting the number of processors

后端 未结 8 1625
耶瑟儿~
耶瑟儿~ 2020-11-30 10:50

How do you detect the number of physical processors/cores in .net?

8条回答
  •  被撕碎了的回忆
    2020-11-30 11:43

    Environment.ProcessorCount will also include any hyperthreaded processors.

    There is no way (at least up through Windows 2003) to distinguish a hyperthreaded processor from one with two cores.

提交回复
热议问题