Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python twisted中reactor.run()和reactor.runReturn()的区别是什么?_Python_Multithreading_Qt4_Twisted_Reactor - Fatal编程技术网

Python twisted中reactor.run()和reactor.runReturn()的区别是什么?

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

这是我得到的代码,我不完全确定runReturn的功能是什么,文档似乎有点稀疏

我怀疑它与reactor.run相同,但是否将线程管理返回到其他地方

    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反应堆。这不是反应堆的正常特征。