@@ -996,13 +996,13 @@ Miscellaneous
996996
997997 This number is not equivalent to the number of CPUs the current process can
998998 use. The number of usable CPUs can be obtained with
999- `` len( os.sched_getaffinity(0)) ``
999+ :func: ` os.process_cpu_count `.
10001000
10011001 When the number of CPUs cannot be determined a :exc: `NotImplementedError `
10021002 is raised.
10031003
10041004 .. seealso ::
1005- :func: `os.cpu_count `
1005+ :func: `os.cpu_count ` and :func: ` os.process_cpu_count `
10061006
10071007.. function :: current_process()
10081008
@@ -2214,7 +2214,7 @@ with the :class:`Pool` class.
22142214 callbacks and has a parallel map implementation.
22152215
22162216 *processes * is the number of worker processes to use. If *processes * is
2217- ``None `` then the number returned by :func: `os.cpu_count ` is used.
2217+ ``None `` then the number returned by :func: `os.process_cpu_count ` is used.
22182218
22192219 If *initializer * is not ``None `` then each worker process will call
22202220 ``initializer(*initargs) `` when it starts.
@@ -2249,6 +2249,10 @@ with the :class:`Pool` class.
22492249 .. versionadded :: 3.4
22502250 *context *
22512251
2252+ .. versionchanged :: 3.13
2253+ *processes * uses :func: `os.process_cpu_count ` by default, instead of
2254+ :func: `os.cpu_count `.
2255+
22522256 .. note ::
22532257
22542258 Worker processes within a :class: `Pool ` typically live for the complete
@@ -2775,7 +2779,7 @@ worker threads rather than worker processes.
27752779 :meth: `~multiprocessing.pool.Pool.terminate ` manually.
27762780
27772781 *processes * is the number of worker threads to use. If *processes * is
2778- ``None `` then the number returned by :func: `os.cpu_count ` is used.
2782+ ``None `` then the number returned by :func: `os.process_cpu_count ` is used.
27792783
27802784 If *initializer * is not ``None `` then each worker process will call
27812785 ``initializer(*initargs) `` when it starts.
0 commit comments