Source.attach

Adds a glib.Source to a context so that it will be executed within that context. Remove it by calling Source.destroy.

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

class Source
uint
attach

Parameters

context MainContext

a glib.MainContext (if NULL, the default context will be used)

Return Value

Type: uint

the ID (greater than 0) for the source within the glib.MainContext