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

Method start

Lib/multiprocessing/process.py:110–126  ·  view source on GitHub ↗

Start child process

(self)

Source from the content-addressed store, hash-verified

108 self._target(*self._args, **self._kwargs)
109
110 def start(self):
111 '''
112 Start child process
113 '''
114 self._check_closed()
115 assert self._popen is None, 'cannot start a process twice'
116 assert self._parent_pid == os.getpid(), \
117 'can only start a process object created by current process'
118 assert not _current_process._config.get('daemon'), \
119 'daemonic processes are not allowed to have children'
120 _cleanup()
121 self._popen = self._Popen(self)
122 self._sentinel = self._popen.sentinel
123 # Avoid a refcycle if the target function holds an indirect
124 # reference to the process object (see bpo-30775)
125 del self._target, self._args, self._kwargs
126 _children.add(self)
127
128 def interrupt(self):
129 '''

Callers 4

ManagerMethod · 0.45
_start_threadMethod · 0.45
__init__Method · 0.45

Calls 5

_check_closedMethod · 0.95
_PopenMethod · 0.95
_cleanupFunction · 0.70
getMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected