Multi-platform Threading

L

Lane LiaBraaten

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
---------------------------------------

Most of the time the program can start a new thread, but the thread never
finishes what it is doing and the program hangs.

LGL
 
P

Peter Hansen

Lane said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,269
Messages
2,571,338
Members
48,029
Latest member
Anchorman2022

Latest Threads

Top