ref_thread_default


Description:

[ Version ( since = "2.32" ) ]
public static MainContext ref_thread_default ()

Gets the thread-default MainContext for this thread, as with get_thread_default, but also adds a reference to it with g_main_context_ref.

In addition, unlike get_thread_default, if the thread-default context is the global default context, this will return that MainContext (with a ref added to it) rather than returning null.

Returns:

the thread-default MainContext. Unref with g_main_context_unref when you are done with it.