__init__.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:pipenv 作者: pypa 项目源码 文件源码
def cpu_count(logical=True):
    """Return the number of logical CPUs in the system (same as
    os.cpu_count() in Python 3.4).

    If logical is False return the number of physical cores only
    (e.g. hyper thread CPUs are excluded).

    Return None if undetermined.

    The return value is cached after first call.
    If desired cache can be cleared like this:

    >>> psutil.cpu_count.cache_clear()
    """
    if logical:
        return _psplatform.cpu_count_logical()
    else:
        return _psplatform.cpu_count_physical()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号