Re: g_idle_add(): limits?



Chris Vine:

I make heavy use of g_idle_add(), and encounter this problem:
It seems that the idle functions aren't called sometimes.

[...]

Assuming that is right, any sources you add before calling
gtk_main_quit() without returning control to the main loop will not be
executed.  I think it probably also means that if you call
gtk_main_quit() in a GTK+ signal handler, which will have a higher
priority than a default idle event, a stacked idle callback will also
not be called (that depends on what the documentation that I have
referred to means by "dispatched").

This might be the case here: I am definitly not calling
gtk_main_quit() too early, since I am sleeping in a loop
before calling it, waiting for my "pending idle function
counter" to become 0 (but it doesn't sometimes as
mentioned).  However, the locking situation here really
prevents giving GTK+ back control while waiting.

I assume this is the problem (since not occuring always I
can not yet say definitly this was the cause, though).

Thanks a lot for now!

 Felix




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