Python twisted中reactor.run()和reactor.runReturn()的区别是什么?
这是我得到的代码,我不完全确定runReturn的功能是什么,文档似乎有点稀疏 我怀疑它与reactor.run相同,但是否将线程管理返回到其他地方Python twisted中reactor.run()和reactor.runReturn()的区别是什么?,python,multithreading,qt4,twisted,reactor,Python,Multithreading,Qt4,Twisted,Reactor,这是我得到的代码,我不完全确定runReturn的功能是什么,文档似乎有点稀疏 我怀疑它与reactor.run相同,但是否将线程管理返回到其他地方 app=QtGui.QApplication('monitor GUI') # Create the application app.setQuitOnLastWindowClosed(False) if reactor is None: # reactor may be the module twisted.inter
app=QtGui.QApplication('monitor GUI') # Create the application
app.setQuitOnLastWindowClosed(False)
if reactor is None: # reactor may be the module twisted.internet.reactor
import qt4reactor # Must be after Qt application is created
qt4reactor.install()
from twisted.internet import reactor
reactor.runReturn()
谢谢PyQT应用程序有自己的类似事件循环!去核反应堆。它们都阻塞了主回路。换句话说,它们都希望控制整个代码流 '使用扭转到PyQt的qt4reactor和reactor.runReturn钉子。从那以后,,
Twisted的行为与Qt/PyQt一样正常。。。上帝的旨意。我只是快速扫描了扭曲的互联网反应器源,没有看到反应器。运行返回。你是从别的地方装反应堆的吗?这是一个特殊的Qt4反应堆。这不是反应堆的正常特征。