Multithreaded GUI programming
Aahz
aahz at pythoncraft.com
Fri Dec 6 14:09:09 EST 2002
In article <3df0906e at nntp.server.uni-frankfurt.de>,
Michael 'Mickey' Lauer <mickey at tm.informatik.uni-frankfurt.de> wrote:
>
>I have a question regarding efficient programming in a multithreaded
>environment. Our scenario deals with Qt, but the problem is a general
>one.
>
>Our setup is a typical multithreaded one: We have a number of worker
>threads and one GUI thread, both communicating via a Queue. The problem
>is: How not to waste CPU resources by using a timer to poll the
>communication Queue from within the GUI thread.
You need to poll. ;-) See the thread tutorial on my web page for an
example of doing this with TKinter; it's not *that* inefficient.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"To me vi is Zen. To use vi is to practice zen. Every command is a
koan. Profound to the user, unintelligible to the uninitiated. You
discover truth everytime you use it." --reddy at lion.austin.ibm.com
More information about the Python-list
mailing list