Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/multiprocessing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ Miscellaneous
Return the number of CPUs in the system.

This number is not equivalent to the number of CPUs the current process can
use. The number of usable CPUs can be obtained with
use. On some Unix platforms, the number of usable CPUs can be obtained with
``len(os.sched_getaffinity(0))``

May raise :exc:`NotImplementedError`.
Expand Down
2 changes: 1 addition & 1 deletion Doc/library/os.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4691,7 +4691,7 @@ Miscellaneous System Information
Return the number of CPUs in the system. Returns ``None`` if undetermined.

This number is not equivalent to the number of CPUs the current process can
use. The number of usable CPUs can be obtained with
use. On some Unix platforms, the number of usable CPUs can be obtained with
``len(os.sched_getaffinity(0))``


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add platform availabity information for :func:`os.sched_getaffinity` where its usage is recommended.
2 changes: 1 addition & 1 deletion Modules/clinic/posixmodule.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -13175,7 +13175,7 @@ os.cpu_count
Return the number of CPUs in the system; return None if indeterminable.

This number is not equivalent to the number of CPUs the current process can
use. The number of usable CPUs can be obtained with
use. On some Unix platforms, the number of usable CPUs can be obtained with
``len(os.sched_getaffinity(0))``
[clinic start generated code]*/

Expand Down