Multi-platform Threading
Peter Hansen
peter at engcorp.com
Fri Oct 17 12:19:29 EDT 2003
Lane LiaBraaten wrote:
>
> I am working on an app that uses the threading module and Queue.Queue(s) for
> communicating between the threads. Everything was working on Linux (Redhat
> 7.3) but when I tried it on WinNT 4.0 it hung at random times during thread
> execution.
>
> Sometimes I get this error and the program craches:
> ---------------------------------------
> TclExecuteByteCode: done instruction at pc 45: stack top 19 != entry stack top
> -1
> TclExecuteByteCode execution failure: end stack top != start stack top
>
> abnormal program termination
> ---------------------------------------
Sounds to me like you are probably violating some constraint of the
single-threaded Tk GUI framework. The above error obviously comes
from Tcl, not from Python, which I think suggests a fundamental
application architectural problem unrelating to threading and Queue.
Are you using the proper mechanisms provided by Tkinter to communicate
with the GUI thread?
-Peter
More information about the Python-list
mailing list