Re: [pygtk] pygtk-1.2 and threading... QA

2002-10-05 Thread James Henstridge
Andrew W. Schmeder wrote: Hi. I am writing a pygtk-1.2 app. I have lots of interaction with GnomeCanvas and lots of threading. For example, it is common to have a thread running which moves, creates or destroys a widget on the canvas. In the process of doing this I encountered a number of

Re: [pygtk] pygtk-1.2 and threading... QA

2002-10-05 Thread Steffen Ries
James Henstridge [EMAIL PROTECTED] writes: [...] Were you making use of the gtk.threads_enter() and gtk.threads_leave() calls to protect GTK calls outside of the main thread/signal handlers? If not, that would explain the problems you ran into. GTK is not completely thread safe, so in some

Re: [pygtk] pygtk-1.2 and threading... QA

2002-10-05 Thread Christian Reis
On Sat, Oct 05, 2002 at 08:28:40AM -0400, Steffen Ries wrote: class T(threading.Thread): def run(self): time.sleep(5) gtk.threads_enter() print acquired GDK lock win = gtk.Window() win.connect(destroy, lambda win: gtk.main_quit())

FAQ and Re: [pygtk] pygtk-1.2 and threading... QA

2002-10-04 Thread Christian Reis
To general list subscribers: it would be nice if, after you spent hours sweating over a problem, and found a solution, people either added it to the FAQ or posted it to the ML, like Andrew did. That way your time invested in finding the fix can benefit others too. On Thu, Oct 03, 2002 at