Re: Updating GUI during long operation



On Sun, 2013-04-21 at 11:33 +0100, Chris Vine wrote:
The code to which you refer does not block, so something else is
blocking the loop. The point you need to understand is that in normal
code there will very rarely be a reason to call "while
Gtk.events_pending(): Gtk.main_iteration()" in a well behaved
application (although that call does not appear in the file to which
you refer), and it would need special justification and explanation.
Furthermore your original posting appeared to indicate ("including the
following within it...") that those iteration calls were made in some
idle handler somewhere, which on the face of it is pointless.

Clearly you are doing something wrong, probably at the design level.
The answer I gave is that most that anyone could give you in the light
of your somewhat incomplete and ambiguous posting.

Hey Chris. Your message was not very useful again, but thanks anyways.
As you realized after, the problem may be too many graphical related
events through the main loop. I will try adjusting the animation's
framerate and seeing if I can get the worker thread to give a breather
to the main thread which seems to be working when using an idle_add()
callback to trigger an event flush.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


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