Skip to content
Commit abcff917 authored by Evan Welsh's avatar Evan Welsh Committed by Philip Chimento
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment