Python+GTK thread question (program freezing)...

Christian Seberino seberino at spawar.navy.mil
Thu Jul 31 18:42:47 EDT 2003


We have a program that uses threads.  If we DON'T run the GTK+ GUI
code then multitasking is fine and every thread gets a little CPU time.

If we run a GTK+ GUI in the main parent process/thread then program
freezes.

The PyGTK commands called gtk.threads.thread_enter() and
gtk.gdk.threads_leave() are used to avoid conflicts caused by
two threads writing to GUI at the same time.  The disallow/allow
other threads to write to GUI as needed.

It would seem that the problem are with these two commands but
the guys cannot seem to find the problem.  As you know, threads
are not the easiest things to debug.

I don't want to think Python threads are unstable.
Are they??

Any ideas at all how to begin to solve this?

Chris




More information about the Python-list mailing list