MCPcopy Index your code
hub / github.com/python/cpython / cpu_count

Method cpu_count

Lib/multiprocessing/context.py:41–47  ·  view source on GitHub ↗

Returns the number of CPUs in the system

(self)

Source from the content-addressed store, hash-verified

39 active_children = staticmethod(process.active_children)
40
41 def cpu_count(self):
42 '''Returns the number of CPUs in the system'''
43 num = os.cpu_count()
44 if num is None:
45 raise NotImplementedError('cannot determine number of cpus')
46 else:
47 return num
48
49 def Manager(self):
50 '''Returns a manager associated with a running server process

Callers 15

make_build_pythonFunction · 0.80
make_host_pythonFunction · 0.80
make_build_pythonFunction · 0.80
make_host_pythonFunction · 0.80
_build_profileMethod · 0.80
test_win32_verMethod · 0.80
test_cpu_countMethod · 0.80
display_headerFunction · 0.80
test_cpu_countMethod · 0.80

Calls

no outgoing calls

Tested by 6

test_win32_verMethod · 0.64
test_cpu_countMethod · 0.64
test_cpu_countMethod · 0.64