Re: waiting without polling



Philippe Ribet <p ribet worldonline fr> writes:

> Hello,
> 
> I looked at gdk_event_prepare, gdk_event_check, gdk_event_dispatch but I
> can't see where program is waiting. I mean, if you call gtk_main(), the
> program is waiting for events, run timeouts sources, but do not poll
> (heavilly loading processor if looking if there is something to do).
> Does g_main_iterate do this "waiting", was a source added with very
> short timeout (I found none), or it has to do with poll_arrays (where to
> see that in code) ?
> 
> Hope my english is understandable,

g_main_iterate() calls g_main_context_poll(), which calls
the "poll func" - typically the system poll() call.

                                        Owen



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