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

Function exit_timeout

Lib/test/libregrtest/utils.py:482–490  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

480
481@contextlib.contextmanager
482def exit_timeout():
483 try:
484 yield
485 except SystemExit as exc:
486 # bpo-38203: Python can hang at exit in Py_Finalize(), especially
487 # on threading._shutdown() call: put a timeout
488 if threading_helper.can_start_thread:
489 faulthandler.dump_traceback_later(EXIT_TIMEOUT, exit=True)
490 sys.exit(exc.code)
491
492
493def remove_testfn(test_name: TestName, verbose: int) -> None:

Callers 2

run_testsMethod · 0.85
mainFunction · 0.85

Calls 1

exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…