[Python-Dev] Use a queue in Tkinter (was: Dealing with tone in an email)
tjreedy at udel.edu
Sun May 6 13:45:48 EDT 2018
On 5/6/2018 8:51 AM, Stefan Krah wrote:
> Steven D'Aprano wrote:
>>> What exactly didn't work? I don't understand.
> Isn't the standard solution to use a queue for updating the GUI?
> At least I didn't have any problems at all with my one TKinter app, I
> think the method is described in the Python Cookbook.
The 2nd edition, Recipe 11.9 Combining GUIs and Asynchronous I/O with
Threads gives an example that processes items in the queue 5 times a
I can understand the desire to avoid the put and get overhead and the
poll wait by calling a gui method directly. This works when one uses
tcl/tk compiled with thread support and avoids inter-thread deadlocks.
See my answer to Chris A. for details.
Terry Jan Reedy
More information about the Python-Dev