MCPcopy Index your code
hub / github.com/NyarchLinux/DesktopPuppet / monitor

Method monitor

src/gui_controller.py:548–564  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

546 self._stop_monitor = False
547
548 def monitor():
549 connected = False
550 while not self._stop_monitor and self.launcher.is_running():
551 if self.controller.is_connected():
552 if not connected:
553 GLib.idle_add(self._on_connected)
554 connected = True
555 else:
556 connected = False
557 time.sleep(1)
558
559 if self._stop_monitor:
560 return
561
562 # Process died
563 if self.launcher.is_running() is False:
564 GLib.idle_add(self._on_process_died)
565
566 self._monitor_thread = threading.Thread(target=monitor, daemon=True)
567 self._monitor_thread.start()

Callers

nothing calls this directly

Calls 2

is_runningMethod · 0.80
is_connectedMethod · 0.80

Tested by

no test coverage detected