MCPcopy Create free account
hub / github.com/mongodb/mongo-python-driver / _target

Method _target

test/__init__.py:940–949  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

938 _print_threads.called = False # type:ignore[attr-defined]
939
940 def _target() -> None:
941 signal.signal(signal.SIGUSR1, _print_threads)
942 try:
943 target()
944 except Exception as exc:
945 sys.stderr.write(f"Child process failed with: {exc}\n")
946 _print_threads()
947 # Sleep for a while to let the parent attach via GDB.
948 time.sleep(2 * timeout)
949 raise
950
951 ctx = multiprocessing.get_context("fork")
952 proc = ctx.Process(target=_target)

Callers 2

_runMethod · 0.45
_runMethod · 0.45

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected