Introduce runAsync() to run main loops without blocking module resolution
All modules are promises. If Gtk.Application.run() or GLib.MainLoop.run() is called within a module it will block all other promises as run() is a synchronous, blocking function. To work around this there is now a setMainLoopHook function exposed which runs a callback after module resolution is complete. This allows APIs to "install" a mainloop asynchronously. For Gio.Application and GLib.MainLoop there are now runAsync() versions of their run() functions. runAsync() returns a Promise which will resolve once the mainloop has exited. Fixes #468
parent
146787f5
Please register or sign in to comment