Re: gtk_events_pending() seems to spin sometimes?
- From: Ben Johnson <ben blarg net>
- To: "Claudio Polegato Jr." <cpolegatojr_lsts pop com br>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: gtk_events_pending() seems to spin sometimes?
- Date: Sun, 27 Mar 2005 10:53:10 -0800
On Sun, Mar 27, 2005 at 07:04:47AM +0000, Claudio Polegato Jr. wrote:
> 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.
my loop looks more like this:
printf("%s: entering problematic loop\n", __FUNCTION__);
while( gtk_events_pending () )
printf("%s: will do: gtk_main_iteration\n", __FUNCTION__);
gtk_main_iteration ();
}
printf("%s: problematic loop finished\n", __FUNCTION__);
under normal operation stdout looks like this:
tell_running_transaction: entering problematic loop
tell_running_transaction: will do: gtk_main_iteration
tell_running_transaction: problematic loop finished
when the problem occurs, stdout looks like this:
tell_running_transaction: entering problematic loop
I think if gtk_events_pending() returned only once before starting up
again and spinning, I would still eventually get at least something else
on stdout. I don't, so I think when this problem happens,
gtk_events_pending() starts spinning during the first invocation.
maybe I'm wrong though. I could add an fflush(STDOUT) to test.
- Ben
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]