[英]Communicating between Processes: Python Multiprocessing
I am using PyQt to create the gui for my application and ran into some trouble using threads for seperate processes, so started to use the multiprocessing.Process class. 我正在使用PyQt为我的应用程序创建gui,并且在使用线程处理独立进程时遇到了一些麻烦,因此开始使用multiprocessing.Process类。 I was, before, using Signals and slots to communicate between the worker process and the gui, but the SignalInstance class can not be pickled and as far as I know cant be used with Process so I am having to find another way to send a progress report (percent done etc) from the worker process to update a progress bar in the gui.
以前,我曾使用Signals和slot在worker进程和gui之间进行通信,但是我无法腌制SignalInstance类,并且据我所知,它不能与Process一起使用,因此我不得不寻找另一种发送进度的方法报告(完成百分比等),以更新gui中的进度条。 what is the best way of doing this?
最好的方法是什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.