I know this question is being asked in many threads but so far I couldn't find proper solution. Below is my code:
Class A:
def init(self):
self.b = B()
Class B:
def init(self):
....
In the main function
d = mp.Manager().dict()
p = mp.Pool(initializer=init function, initargs=[d])
d holds the objects created by multiple processes. But when it runs, the variables inside the object are not shared between processes.
Please advice