GLib.MainContext.prototype.invoke_full

function invoke_full(priority: Number(gint), function: GLib.SourceFunc): void {
    // Gjs wrapper for g_main_context_invoke_full()
}
  

Invokes a function in such a way that context is owned during the invocation of function.

This function is the same as GLib.MainContext.invoke except that it lets you specify the priority incase function ends up being scheduled as an idle and also lets you give a GLib.DestroyNotify for data.

notify should not assume that it is called from any particular thread or with any particular context acquired.

Since 2.28

priority

the priority at which to run function

function

function to call