Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 984a978

Browse files
committed
Specify that os.cpu_count() counts *logicial* CPUs
1 parent df887a8 commit 984a978

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Doc/library/os.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5155,10 +5155,11 @@ Miscellaneous System Information
51555155

51565156
.. function:: cpu_count(*, usable=False)
51575157

5158-
Return the number of CPUs in the system. Returns ``None`` if undetermined.
5158+
Return the number of logical CPUs in the system. Returns ``None`` if
5159+
undetermined.
51595160

5160-
If *usable* is true, return the number of CPUs the current process can use.
5161-
If the :func:`sched_getaffinity` function is available, return
5161+
If *usable* is true, return the number of logical CPUs the current process
5162+
can use. If the :func:`sched_getaffinity` function is available, return
51625163
``len(os.sched_getaffinity(0))``, otherwise just return
51635164
``cpu_count(usable=False)``.
51645165

0 commit comments

Comments
 (0)