PyQT的多线程

stackoverflow对PyQT是使用Python多线程还是Qt多线程问题的讨论
http://stackoverflow.com/questions/1595649/threading-in-a-pyqt-application-use-qt-threads-or-python-threads

讨论倾向于:
A general rule of thumb might be to use QThreads if you’re going to interact somehow with Qt, and use Python threads otherwise.
也就是:如果要与Qt交互,则使用QThreads,否则使用Python threads。
而一般情况下都会涉及到线程间通讯,Qt的Queued signals/slots 非常方便,因此通常都会使用QThreads

另一个问题
Python’s threads are system threads. However, Python uses a global interpreter lock (GIL) to ensure that the interpreter is only ever executing a certain size block of byte-code instructions at a time.
Python解释器运行时会加GIL锁,以保证按脚本顺序执行。如果QThreads线程中使用Python语句会出现什么问题呢?
不用担心,Python会在异步I/O以及调用第三方库时自动释放GIL锁。你的多线程依然可以并行,但是这里的并行是个假象,实际上是分时执行的。对于网络通讯等情况完全足够使用。如果非要在多核处理器上处理计算密集型运算,可以

1 使用python的multiprocessing 模块,能够发挥多核的优势。
2 使用ironPython,但是这个只能在windows下用
3 使用pypy,这个可以实现真正的多线程。本段内容引自百度知道