diff options
author | Charles-Francois Natali <cf.natali@gmail.com> | 2013-05-20 12:40:46 (GMT) |
---|---|---|
committer | Charles-Francois Natali <cf.natali@gmail.com> | 2013-05-20 12:40:46 (GMT) |
commit | 44feda3cd0454cd00028e09f3151de67e8aad76f (patch) | |
tree | a96b037934976f43273b9c6347b2cf098e7bb813 /Doc/library/os.rst | |
parent | 93c6770c7202ea8c123a1d04e76be1007584697e (diff) | |
download | cpython-44feda3cd0454cd00028e09f3151de67e8aad76f.zip cpython-44feda3cd0454cd00028e09f3151de67e8aad76f.tar.gz cpython-44feda3cd0454cd00028e09f3151de67e8aad76f.tar.bz2 |
Issue #17914: Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
initial patch by Trent Nelson.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r-- | Doc/library/os.rst | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 4ab5ebd..137fd42 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -3155,10 +3155,6 @@ operating system. Return the set of CPUs the process with PID *pid* (or the current process if zero) is restricted to. - .. seealso:: - :func:`multiprocessing.cpu_count` returns the number of CPUs in the - system. - .. _os-path: @@ -3196,6 +3192,13 @@ Miscellaneous System Information Availability: Unix. +.. function:: cpu_count() + + Return the number of CPUs in the system. Returns None if undetermined. + + .. versionadded:: 3.4 + + .. function:: getloadavg() Return the number of processes in the system run queue averaged over the last |