(self, pid, callback, *args)
| 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 |