[BangPypers] Fwd: Error in python multiprocessing!

Akshay Verma veraks18 at gmail.com
Sat Aug 27 12:48:30 EDT 2016


Hi,

Could you guys suggest a solution for the problem described in the message
attached below?
---------- अग्रेषित संदेश ----------
प्रेषक: "Akshay Verma" <akshay.tvastr at yahoo.com>
दिनांक: 27/08/2016 10:16
विषय: Error in python multiprocessing!
प्रति:
प्रतिलिपि:

Hi all,

After a lot of searching on the internet, I am looking for help from you
guys.

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.

What could be the cause of this error? Is there a better way to solve this
issue? Any suggestions are welcome.

Regards, Akshay Verma


More information about the BangPypers mailing list