If context is currently blocking in MainContext.iteration
waiting for a source to become ready, cause it to stop blocking
and return. Otherwise, cause the next invocation of
MainContext.iteration to return without blocking.
This API is useful for low-level control over glib.MainContext; for
example, integrating it with main loop implementations such as
glib.MainLoop
Another related use for this function is when implementing a main
loop with a termination condition, computed from multiple threads:
If context is currently blocking in MainContext.iteration waiting for a source to become ready, cause it to stop blocking and return. Otherwise, cause the next invocation of MainContext.iteration to return without blocking.
This API is useful for low-level control over glib.MainContext; for example, integrating it with main loop implementations such as glib.MainLoop
Another related use for this function is when implementing a main loop with a termination condition, computed from multiple threads:
Then in a thread:
`perform_work()`; if (g_atomic_int_dec_and_test (&tasks_remaining)) g_main_context_wakeup (NULL);