[BangPypers] Fwd: Error in python multiprocessing!

Jaysinh shukla jaysinhp at gmail.com
Sat Aug 27 13:54:08 EDT 2016


On Aug 27, 2016 10:19 PM, "Akshay Verma" <veraks18 at gmail.com> wrote:
>
> I am working on a Qt based GUI which takes in a stream of file paths
coming
> from a separate process and reads those data file for post-processing and
> plotting. Since post-processing and plotting have become a bit involved,
> there is a request to improve the performance of the GUI. Currently the
GUI
> takes in the input message with the path of the file and gives a SIGNAL to
> the Worker thread (Qt thread) to process the file. The processing results
> are saved in the object for reference and display within the GUI. Simple
> separation of the threads does not help a lot for intensive processing
> cases. I had to add a sleep of 1 sec to quick fix the GIL of Python and
> make the GUI responsive. To improve the solution, I thought of using
> Multiprocessing for the post-processing task. I am trying to add the task
> to queue and get back the result in a queue. When I implement this
> solution, I get '*TypeError: cannot serailize '_io.TextIOWrapper' object'*
> at the call of start() of the Process.
>

Share the code to identity the problem. Multiprocessing is tricky part.


More information about the BangPypers mailing list