Re: gtk_events_pending() seems to spin sometimes?
- From: "Claudio Polegato Jr." <cpolegatojr_lsts pop com br>
- To: Ben Johnson <ben blarg net>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: gtk_events_pending() seems to spin sometimes?
- Date: Sun, 27 Mar 2005 07:04:47 +0000
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:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]