Are Tkinter StringVar (IntVar, etc) thread safe?

python at bdurham.com python at bdurham.com
Fri Oct 29 17:09:56 EDT 2010


Are Tkinter StringVar (IntVar, FloatVar, etc) thread safe, eg.
can a background thread read or write to these objects? Or must I
use a Queue to pass information between my background thread and
my main Tkinter GUI thread and have my main Tkinter thread pop
the Queue and update the application's StringVar's accordingly?

I know my background threads can not read or write a Tkinter
widget directly but I'm unclear on whether StringVar's are
considered widgets or if they are objects far enough removed from
widgets that they are thread safe.

Thank you,
Malcolm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101029/0864797d/attachment.html>


More information about the Python-list mailing list