summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorCharles-Francois Natali <cf.natali@gmail.com>2013-05-20 12:40:46 (GMT)
committerCharles-Francois Natali <cf.natali@gmail.com>2013-05-20 12:40:46 (GMT)
commit44feda3cd0454cd00028e09f3151de67e8aad76f (patch)
treea96b037934976f43273b9c6347b2cf098e7bb813 /Doc/library
parent93c6770c7202ea8c123a1d04e76be1007584697e (diff)
downloadcpython-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')
-rw-r--r--Doc/library/multiprocessing.rst3
-rw-r--r--Doc/library/os.rst11
2 files changed, 10 insertions, 4 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index 1c18062..2562e30 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -702,6 +702,9 @@ Miscellaneous
Return the number of CPUs in the system. May raise
:exc:`NotImplementedError`.
+ .. seealso::
+ :func:`os.cpu_count`
+
.. function:: current_process()
Return the :class:`Process` object corresponding to the current process.
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