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

Function _main

Lib/multiprocessing/spawn.py:126–135  ·  view source on GitHub ↗
(fd, parent_sentinel)

Source from the content-addressed store, hash-verified

124
125
126def _main(fd, parent_sentinel):
127 with os.fdopen(fd, 'rb', closefd=True) as from_parent:
128 process.current_process()._inheriting = True
129 try:
130 preparation_data = reduction.pickle.load(from_parent)
131 prepare(preparation_data)
132 self = reduction.pickle.load(from_parent)
133 finally:
134 del process.current_process()._inheriting
135 return self._bootstrap(parent_sentinel)
136
137
138def _check_not_importing_main():

Callers 1

spawn_mainFunction · 0.70

Calls 3

prepareFunction · 0.70
loadMethod · 0.45
_bootstrapMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…