attach

fun attach(context: MainContext? = null): <Error class: unknown class>

Adds a #GSource to a @context so that it will be executed within that context. Remove it by calling g_source_destroy().

This function is safe to call from any thread, regardless of which thread the @context is running in.

Return

the ID (greater than 0) for the source within the #GMainContext.

Parameters

context

a #GMainContext (if null, the default context will be used)