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

Method _set_coroutine_origin_tracking

Lib/asyncio/base_events.py:2070–2083  ·  view source on GitHub ↗
(self, enabled)

Source from the content-addressed store, hash-verified

2068 handle = None # Needed to break cycles when an exception occurs.
2069
2070 def _set_coroutine_origin_tracking(self, enabled):
2071 if bool(enabled) == bool(self._coroutine_origin_tracking_enabled):
2072 return
2073
2074 if enabled:
2075 self._coroutine_origin_tracking_saved_depth = (
2076 sys.get_coroutine_origin_tracking_depth())
2077 sys.set_coroutine_origin_tracking_depth(
2078 constants.DEBUG_STACK_DEPTH)
2079 else:
2080 sys.set_coroutine_origin_tracking_depth(
2081 self._coroutine_origin_tracking_saved_depth)
2082
2083 self._coroutine_origin_tracking_enabled = enabled
2084
2085 def get_debug(self):
2086 return self._debug

Callers 2

_run_forever_setupMethod · 0.95
_run_forever_cleanupMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected