Re: gtk_events_pending() seems to spin sometimes?

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

 



Hi,

Maybe the line

   printf("%s: will do: gtk_main_iteration ", __FUNCTION__);

 into the loop create a new event to iteration, then drop this line and test.

[]'s

Claudio




Ben Johnson escreveu:

Hi.

I have a loop that looks like this...

while( gtk_events_pending () )
{
   printf("%s: will do: gtk_main_iteration ", __FUNCTION__);
   gtk_main_iteration ();
}


If I understand right, that should be pretty standard GTK+ code. Sometimes
when my program hits this loop, gtk_events_pending() blocks forever and
my application starts using all the cpu cycles. If I attach to it with
gdb I get a back trace that looks something like this:



_______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux