Package: glib
Function g-main-context-wakeup
Lambda Listg-main-context-wakeup (context) ArgumentsDetails If context is currently blocking in a call of the g-main-context-iteration function waiting for a source to become
ready, cause it to stop blocking and return. Otherwise, cause the next invocation of the g-main-context-iteration
function to return without blocking. This API is useful for low-level control over a main context. For example, integrating it with main loop implementations such as a g-main-loop implementation. Another related use for this function is when implementing a main loop with a termination condition, computed from multiple threads: #define NUM_TASKS 10 static volatile gint tasks_remaining = NUM_TASKS; ... | See also |
2021-12-10