mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 15:26:04 +00:00
perf: the session's background watchers share two loops and one D-Bus service process (#575)
This commit is contained in:
1 parent
a0d3e03ca0
commit
7ea4efef98
4 files changed
+172
-137
No files matched your search
@@ -408,8 +408,7 @@ class NetworkManager:
|
||||
self.bus.emit_signal(None, path, OBJECT_MANAGER, signal, body)
|
||||
|
||||
|
||||
def main():
|
||||
loop = GLib.MainLoop()
|
||||
def own(loop):
|
||||
state = {}
|
||||
|
||||
def acquired(bus, name):
|
||||
@@ -419,7 +418,12 @@ def main():
|
||||
print("== netmanager: the system bus is gone", file=sys.stderr)
|
||||
loop.quit()
|
||||
|
||||
Gio.bus_own_name(Gio.BusType.SYSTEM, NAME, Gio.BusNameOwnerFlags.NONE, acquired, None, lost)
|
||||
return Gio.bus_own_name(Gio.BusType.SYSTEM, NAME, Gio.BusNameOwnerFlags.NONE, acquired, None, lost)
|
||||
|
||||
|
||||
def main():
|
||||
loop = GLib.MainLoop()
|
||||
own(loop)
|
||||
loop.run()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user