using multiprocessing.Pool on bound methods
问题 I'm trying to use multiprocessing.Pool in my code but I got this exception: PicklingError: Can't pickle <type 'instancemethod'>: attribute lookup __builtin__.instancemethod failed I found this and it's preferred solution recipe my problem is that I don't know how to implement this solution in my code. my code is something like that: class G(class): def submit(self,data): cmd = self.createCommand(data) subprocess.call(cmd, shell=True) # call for a short command def main(self): self.pool =