get_main_context


Description:

[ Version ( since = "1.22" ) ]
public unowned MainContext get_main_context ()

The Client instance is permanently associated with the current thread default MainContext, referenced the time when the instance was created.

To receive events, the user must iterate this context and can use it to synchronize access to the client.

Note that even after Client instance got destroyed, there might still be pending sources registered in the context. That means, to fully clean up, the user must continue iterating the context as long as the get_context_busy_watcher object is alive.

Parameters:

this

the Client instance

Returns:

the MainContext of the client.




2022 vala-language.org