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

Method __enter__

Lib/profiling/sampling/_child_monitor.py:86–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

84 self._poll_count = 0
85
86 def __enter__(self):
87 self._monitor_thread = threading.Thread(
88 target=self._monitor_loop,
89 daemon=True,
90 name=f"child-monitor-{self.parent_pid}",
91 )
92 self._monitor_thread.start()
93 return self
94
95 def __exit__(self, exc_type, exc_val, exc_tb):
96 self._stop_event.set()

Callers

nothing calls this directly

Calls 1

startMethod · 0.45

Tested by

no test coverage detected