invoke

fun invoke(function: SourceFunc)

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

If @context is null then the global-default main context — as returned by func@GLib.MainContext.default — is used.

If @context is owned by the current thread, @function is called directly. Otherwise, if @context is the thread-default main context of the current thread and method@GLib.MainContext.acquire succeeds, then

Since

2.28

Parameters

function

function to call