[BangPypers] Fwd: Error in python multiprocessing!
vsapre80 at gmail.com
Sat Aug 27 19:57:36 EDT 2016
For multiprocessing to work fine, everything used in the function and the
function itself should be "pickle able". There were issues with function
calls being pickled on Windows.
Make sure you can pickle all your calls separately on your platform.
On Aug 27, 2016 11:24 PM, "Jaysinh shukla" <jaysinhp at gmail.com> wrote:
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
> 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
> 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.
BangPypers mailing list
BangPypers at python.org
More information about the BangPypers