invoke

fun invoke(function: SourceFunc)(source)

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 g_main_context_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 g_main_context_acquire() succeeds, then

Since

2.28

Parameters

function

function to call