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

Method add_child_handler

Lib/asyncio/unix_events.py:918–925  ·  view source on GitHub ↗
(self, pid, callback, *args)

Source from the content-addressed store, hash-verified

916 source=self)
917
918 def add_child_handler(self, pid, callback, *args):
919 loop = events.get_running_loop()
920 thread = threading.Thread(target=self._do_waitpid,
921 name=f"asyncio-waitpid-{next(self._pid_counter)}",
922 args=(loop, pid, callback, args),
923 daemon=True)
924 self._threads[pid] = thread
925 thread.start()
926
927 def _do_waitpid(self, loop, expected_pid, callback, args):
928 assert expected_pid > 0

Callers

nothing calls this directly

Calls 1

startMethod · 0.95

Tested by

no test coverage detected