by definition you cannot determine if events are ready without something semantically equivalent to poll(2). whether or not you block in that poll-equivalent thing is a different story.
using a main loop that never blocks is a design error. it implies burning cpu time for no reason, which typically only happens when someone can't figure how to integrate "another event source" into the main loop. glib makes this easy for just about kind of event source, so there isn't much of an excuse for this sort of design.On Wed, Jun 26, 2013 at 7:21 PM, Kip Warner <kip@xxxxxxxxxxxxxx> wrote:
On Wed, 2013-06-26 at 19:16 -0400, Paul Davis wrote:He said after that that he'd like to avoid a loop with sleep (polling).
> the OP asked:
>
> Is it possible to wait for GMainLoop event without processing them?
Maybe that's good enough for him, I don't know. But if he doesn't want
> query polls but does not process events. only dispatch does that.
polling, then it won't be.
--
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list