MCPcopy Index your code
hub / github.com/rawpython/remi / _idle_loop

Method _idle_loop

remi/server.py:455–470  ·  view source on GitHub ↗

This is used to exec the idle function in a safe context and a separate thread

(self)

Source from the content-addressed store, hash-verified

453 raise NotImplementedError("Applications must implement 'main()' function.")
454
455 def _idle_loop(self):
456 """ This is used to exec the idle function in a safe context and a separate thread
457 """
458 while not self._stop_update_flag:
459 time.sleep(self.update_interval)
460 with self.update_lock:
461 try:
462 self.idle()
463 except Exception:
464 self._log.error("exception in App.idle method", exc_info=True)
465 if self._need_update_flag:
466 try:
467 self.do_gui_update()
468 except Exception:
469 self._log.error('''exception during gui update. It is advisable to
470 use App.update_lock using external threads.''', exc_info=True)
471
472 def idle(self):
473 """ Idle function called every UPDATE_INTERVAL before the gui update.

Callers

nothing calls this directly

Calls 2

idleMethod · 0.95
do_gui_updateMethod · 0.95

Tested by

no test coverage detected