Re: gtk_events_pending() seems to spin sometimes?

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

 



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

_______________________________________________

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