Package: glib

Function g-main-context-iteration

Lambda List

g-main-context-iteration (context block)

Arguments

context -- a g-main-context instance, if null-pointer, the default context will be used
block -- a boolean whether the call may block

Return Value

True if events were dispatched.

Details

Runs a single iteration for the given main loop. This involves checking to see if any event sources are ready to be processed, then if no events sources are ready and the block argument is true, waiting for a source to become ready, then dispatching the highest priority events sources that are ready. Otherwise, if the block argument is false sources are not waited to become ready, only those highest priority events sources will be dispatched (if any), that are ready at this given moment without further waiting.

Note that even when the block argument is true, it is still possible for the g-main-context-iteration function to return false, since the wait may be interrupted for other reasons than an event source becoming ready.
 

See also

2021-12-10