Z
Zdenek Maxa
Hello,
I have started a project using Tkinter. The application performs some
regular checks in a thread and updates Canvas components. I have
observed that sometimes the application hangs when it is about to call
canvas.itemconfig() when the thread is about to terminate in the next loop.
Experimenting with this problem for a while, I have compiled a little
example which always reproduces the problem. Commenting out the line 52
(before canvas.itemconfig()), the example always finishes all right,
having the delay there, it hangs.
I would like to ask if you could have a look at the snippet in the
attachment and tell me if that is actually me doing something wrong or
indeed Tkinter thread safety problem and what the workaround could be.
Could you please also comment on wxPython thread safety?
I am using:
Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45)
[GCC 4.3.3]
2.6.26-1-amd64 #1 SMP Fri Mar 13 19:34:38 UTC 2009 x86_64 GNU/Linux
Thanks in advance,
Zdenek
I have started a project using Tkinter. The application performs some
regular checks in a thread and updates Canvas components. I have
observed that sometimes the application hangs when it is about to call
canvas.itemconfig() when the thread is about to terminate in the next loop.
Experimenting with this problem for a while, I have compiled a little
example which always reproduces the problem. Commenting out the line 52
(before canvas.itemconfig()), the example always finishes all right,
having the delay there, it hangs.
I would like to ask if you could have a look at the snippet in the
attachment and tell me if that is actually me doing something wrong or
indeed Tkinter thread safety problem and what the workaround could be.
Could you please also comment on wxPython thread safety?
I am using:
Python 2.5.4 (r254:67916, Feb 17 2009, 20:16:45)
[GCC 4.3.3]
2.6.26-1-amd64 #1 SMP Fri Mar 13 19:34:38 UTC 2009 x86_64 GNU/Linux
Thanks in advance,
Zdenek