I need to run a function in a process, which is completely isolated from all other memory, several times. I would like to use multiprocessing for that (since I
observe that using chunksize=1 in a Pool map will do the pool wait for a complete round of process to finish to start a new one.
with Pool(3, maxtasksperchild=1) as p:
p.map(do_job, args_list, chunksize=1)
For example, above the pool will wait until all the first 3 process (eg 1000,1001,1002) finish to then start the new round(1003,1004,1005)