GLib: g_main_context_iterate



Hello!

The documentation says g_main_context_iteration returns true if events were dispatched, however it returns true, wether there were dispatchable sources at g_main_context_prepare in g_main_context_iterate.

Daniel Kishazi



static gboolean
g_main_context_iterate (GMainContext *context, gboolean block, gboolean dispatch,
 			GThread      *self)
{
  ...
    some_ready = g_main_context_prepare (context, &max_priority);
    ... /* g_main_context_query loop */
    g_main_context_poll (context, timeout, max_priority, fds, nfds);
    g_main_context_check (context, max_priority, fds, nfds);
    if (dispatch)
    g_main_context_dispatch (context);
  #ifdef G_THREADS_ENABLED
  g_main_context_release (context);
#endif /* G_THREADS_ENABLED */
    LOCK_CONTEXT (context);
    return some_ready;
}




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]