attach
Description:
Adds a [struct@GLib.
Source] to a context so that it will be executed within that context.
Remove it by calling [method@GLib.Source.destroy].
This function is safe to call from any thread, regardless of which thread the context is running in.
Parameters:
| this |
a source |
| context |
a main context (if `NULL`, the global-default main context will be used) |
Returns:
|
the ID (greater than 0) for the source within the [struct@GLib.MainContext] |