:right-sidebar: True MainLoop =================================================================== .. currentmodule:: gi.repository.GLib .. class:: MainLoop(context=None) :no-contents-entry: The ``GMainLoop`` struct is an opaque data type representing the main event loop of a GLib or GTK application. Methods ------- .. rst-class:: interim-class .. class:: MainLoop :no-index: .. method:: run() Runs a main loop until :obj:`~gi.repository.GLib.MainLoop.quit` is called on the loop. If this is called for the thread of the loop's :obj:`~gi.repository.GLib.MainContext`\, it will process events from the loop, otherwise it will simply wait.