Replace pickle in Python multiprocessing lib
Try multiprocess
. It's a fork of multiprocessing
that uses the dill
serializer instead of pickle
-- there are no other changes in the fork.
I'm the author. I encountered the same problem as you several years ago, and ultimately I decided that that hacking the standard library was my only choice, as some of the pickle
code in multiprocessing
is in C++.
>>> import multiprocess as mp
>>> p = mp.Pool()
>>> p.map(lambda x:x**2, range(4))
[0, 1, 4, 9]
>>>