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

Method _wait_completed

Lib/test/libregrtest/run_workers.py:420–431  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

418 self.output.put(WorkerThreadExited())
419
420 def _wait_completed(self) -> None:
421 popen = self._popen
422 # only needed for mypy:
423 if popen is None:
424 raise ValueError("Should never access `._popen` before calling `.run()`")
425
426 try:
427 popen.wait(WAIT_COMPLETED_TIMEOUT)
428 except (subprocess.TimeoutExpired, OSError) as exc:
429 print_warning(f"Failed to wait for {self} completion "
430 f"(timeout={format_duration(WAIT_COMPLETED_TIMEOUT)}): "
431 f"{exc!r}")
432
433 def wait_stopped(self, start_time: float) -> None:
434 # bpo-38207: RunWorkers.stop_workers() called self.stop()

Callers 1

_run_processMethod · 0.95

Calls 3

format_durationFunction · 0.85
print_warningFunction · 0.70
waitMethod · 0.45

Tested by

no test coverage detected