How can I run multiple processes pool where I process run1-3 asynchronously, with a multi processing tool in python. I am trying to pass the values (10,2,4),(55,6,8),(9,8,7)
for run1,run2,run3
respectively?
import multiprocessing def Numbers(number,number2,divider): value = number * value2 /dividor return value if __name__ == "__main__": with multiprocessing.Pool(3) as pool: # 3 processes run1, run2, run3 = pool.map(Numbers, [(10,2,4),(55,6,8),(9,8,7)]) # map input & output
https://stackoverflow.com/questions/66996823/plotting-the-pool-map-for-multi-processing-python April 08, 2021 at 11:07AM
没有评论:
发表评论