Re: Updating GUI during long operation

2013-04-25 Thread Simon Feltman
On Sat, Apr 20, 2013 at 4:25 PM, Kip Warner wrote: > A brief look at the source and it seems there is nothing calling Gdk.threads_init which I think is needed. Similarly, use Gdk.threads_add_idle instead of GObject.idle_add for scheduling GUI updates from worker threads. T

Re: Updating GUI during long operation

2013-04-25 Thread Michael Torrie
On 04/25/2013 08:04 PM, Kip Warner wrote: > 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 work

Re: Updating GUI during long operation

2013-04-25 Thread Kip Warner
On Thu, 2013-04-25 at 22:53 -0400, Allin Cottrell wrote: > I have a situation which might, perhaps, be akin to yours. From the > GUI, my app calls an iterative numerical procedure that can be quite > time consuming. Without any special treatment, this causes the GUI > to appear "frozen" and unre

Re: Updating GUI during long operation

2013-04-25 Thread Allin Cottrell
On Thu, 25 Apr 2013, Kip Warner wrote: 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. I have a situation which might, perhaps

Re: Updating GUI during long operation

2013-04-25 Thread Kip Warner
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

Re: Updating GUI during long operation

2013-04-25 Thread Kip Warner
On Sat, 2013-04-20 at 18:54 +0200, Colomban Wendling wrote: > Just never do something time consuming in the main loop thread. If you > don't there should not be any lag. Hey Colomban. The time consuming task is in its own separate thread, but it's making a GIF animation lag and user interface r