[Gtk-sharp-list] GLib.Idle CPU problem

Adam Tauno Williams awilliam at whitemice.org
Sat Jan 22 14:52:36 EST 2011


On Fri, 2011-01-21 at 07:36 -0800, Peter Johanson wrote: 
> That is the difference with GLib.Idle.
> It goes like this:
> 1) Run your IdleHandler.
> 2) Process any other events that need processing. This could be
> *nothing*
> 3) "Oh, I'm idle again, guess I'll run any idle handlers" => RUns your
> IdleHandler (return to step #1).
> Which explains your 50% CPU usage, your idle handler is getting run time
> after time after time.

If you periodically just want to check a queue or the status of
something a Timer event is probably better than an Idle event.  Events
that just want to be pending till the application is idle should be what
Idle events are used for - where they are processed and then discarded
[return false].



More information about the Gtk-sharp-list mailing list