[docs] [issue11029] Crash, 2.7.1, Tkinter and threads and line drawing
report at bugs.python.org
Fri Jan 28 17:38:12 CET 2011
Scott M <scott.mayo at comcast.net> added the comment:
Alright. More digging turned up the Tkinter "after" function, aka WM_TIMER for Windowy people like me, and that plus a nonblocking queue get() gets all my drawing operations back into the mainLoop() thread. Voilà, no more crashes.
Let me suggest that page one, sentence one of any Tkinter documentation should begin "Tkinter is not thread safe", with a link to an example of after() and nonblocking get(). I've changed the component to Documentation. This would save a few days for poor sods like me -- I'm used to low level Windows C++ GUI work, where any thread can call any SDK function at any time, and Windows sorts it all out.
Having to force everything into a single thread, and then poll for my data (*GAG*), is something I thought died in the 80's. Is anyone looking at thread safe GUI libraries?
assignee: -> docs at python
components: +Documentation -Tkinter
nosy: +docs at python
Python tracker <report at bugs.python.org>
More information about the docs