MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / _run_with_interrupt_thread

Function _run_with_interrupt_thread

_pydevd_bundle/pydevd_vars.py:295–309  ·  view source on GitHub ↗
(original_func, py_db, curr_thread, frame, expression, is_exec)

Source from the content-addressed store, hash-verified

293
294
295def _run_with_interrupt_thread(original_func, py_db, curr_thread, frame, expression, is_exec):
296 on_interrupt_threads = None
297 timeout_tracker = py_db.timeout_tracker # : :type timeout_tracker: TimeoutTracker
298
299 interrupt_thread_timeout = pydevd_constants.PYDEVD_INTERRUPT_THREAD_TIMEOUT
300
301 if interrupt_thread_timeout > 0:
302 on_interrupt_threads = pydevd_timeout.create_interrupt_this_thread_callback()
303 pydev_log.info("Doing evaluate with interrupt threads timeout: %s.", interrupt_thread_timeout)
304
305 if on_interrupt_threads is None:
306 return original_func(py_db, frame, expression, is_exec)
307 else:
308 with timeout_tracker.call_on_timeout(interrupt_thread_timeout, on_interrupt_threads):
309 return original_func(py_db, frame, expression, is_exec)
310
311
312def _run_with_unblock_threads(original_func, py_db, curr_thread, frame, expression, is_exec):

Callers 1

Calls 2

infoMethod · 0.80
call_on_timeoutMethod · 0.80

Tested by

no test coverage detected