import multiprocessing as mp
a=[1,2,3,4,5,6,7,8,9,10]
def doPreprocess(f):
print("f")
if __name__ == "__main__":
files = ["hello"] * 10
pool = mp.Pool(processes=4)
res = pool.map(doPreprocess, a)
print ("temp")
The only output from this code is:
temp
From a number of other examples that are claimed to work I have generally the same issue of no processes starting or a pool of processes not starting. If it helps, I am trying to create a set of processes running in parallel. However from what I have read, python 3.7 has issues on windows 10 with spawning processes.