multithreading and Tkinter
James Logajan
JamesL at Lugoj.com
Sun Mar 31 19:10:06 EST 2002
martin at v.loewis.de (Martin v. Loewis) wrote:
[ On a thread signalling the Tkinter mainloop thread: ]
> If you want to delete the need for an after() method altogether, you
> could register an after_idle callback. You can do that from a
> different thread; Tkinter will call the after_idle callback from the
> same thread that runs the mainloop.
Has anyone ever tried using after_idle in a worker thread as a way to
signal a Tkinter mainloop thread? I'm wondering if this proposal is
really thread safe, since technically a worker thread is making a call to
Tk (even if it is nothing more than registering a callback) while the
mainloop thread may also be in the process of making calls to Tk. I haven't
tried it but have been considering it, but wanted to know if this was a
reasonable solution.
Thanks!
More information about the Python-list
mailing list