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

Method task

Lib/test/_test_multiprocessing.py:2215–2223  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2213 self._finalizer = weakref.finalize(self, finalize, threads)
2214
2215 def task(self):
2216 pid = os.getpid()
2217 self.started.append(pid)
2218 try:
2219 self.f(*self.args)
2220 finally:
2221 self.finished.append(pid)
2222 self._can_exit.wait(30)
2223 assert self._can_exit.is_set()
2224
2225 def wait_for_started(self):
2226 while len(self.started) < self.n:

Callers

nothing calls this directly

Calls 4

appendMethod · 0.45
fMethod · 0.45
waitMethod · 0.45
is_setMethod · 0.45

Tested by

no test coverage detected