I'm trying to run a pool of process, and the function receives two arguments and a Queue.
I have already tried creating a class object to holds the queue, but didn't worked.
from functools import partial
from multiprocessing import Pool
import multiprocessing as mp
release_queue = mp.Queue()
p = Pool(4, maxtasksperchild=10)
func = partial(self.process_image_pair, dataset=desired_dataset, release_queue=release_queue, )
p.map(func, parsed_pairs)
But i'm getting as result this error
RuntimeError: Queue objects should only be shared between processes through inheritance