Python Multiprocessing Lib Error (AttributeError: __exit__)
问题 Am getting this error when using the pool.map(funct, iterable) : AttributeError: __exit__ No Explanation, only stack trace to the pool.py file within the module. using in this way: with Pool(processes=2) as pool: pool.map(myFunction, mylist) pool.map(myfunction2, mylist2) I suspect there could be a problem with the picklability (python needs to pickle , or transform list data into byte stream) yet I'm not sure if this is true or if it is how to debug. EDIT: new format of code that produces