docs: def run(self):
          """Run the main loop. Returns exit code."""
          self.exit_code = 1
          self.mainloop = GLib.MainLoop()
          try:
              future = ensure_future(self._start_async_tasks())
              future.callbacks.append(self.set_exit_code)
              self.mainloop.run()
              return self.exit_code
          except KeyboardInterrupt:
              return 1