MCPcopy Index your code
hub / github.com/fabioz/PyDev.Debugger / _on_run

Method _on_run

pydevd.py:310–334  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

308
309 @overrides(PyDBDaemonThread._on_run)
310 def _on_run(self):
311 py_db = self.py_db
312
313 def can_exit():
314 with py_db._main_lock:
315 # Note: it's important to get the lock besides checking that it's empty (this
316 # means that we're not in the middle of some command processing).
317 writer = py_db.writer
318 writer_empty = writer is not None and writer.empty()
319
320 return not py_db.has_user_threads_alive() and writer_empty
321
322 try:
323 while not self._kill_received:
324 self._wait_event.wait(TIMEOUT_SLOW)
325 if can_exit():
326 break
327
328 py_db.check_output_redirect()
329
330 if can_exit():
331 pydev_log.debug("No threads alive, finishing debug session")
332 py_db.dispose_and_kill_all_pydevd_threads()
333 except:
334 pydev_log.exception()
335
336 def join(self, timeout=None):
337 # If someone tries to join this thread, mark it to be killed.

Callers

nothing calls this directly

Calls 4

check_output_redirectMethod · 0.80
exceptionMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected