python获取当前计算机cpu数量

源于: 执行类代码 – MainOne.py – 函数main_faker

cpu_count的返回值就是cpu数量:

from multiprocessing import cpu_count
print(cpu_count())
发布了255 篇原创文章 · 获赞 28 · 访问量 2万+

猜你喜欢

转载自blog.csdn.net/weixin_43283397/article/details/104249376
今日推荐