Hi Akshay, 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.
Vishal On Aug 27, 2016 11:24 PM, "Jaysinh shukla" <jaysi...@gmail.com> wrote: On Aug 27, 2016 10:19 PM, "Akshay Verma" <verak...@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. _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers