I'm using multiprocessing.Pool in 2 function that run sequentially. I create the Pool in the first function and when it terminate, I close it and open it in the second.
multiprocessing.Pool
Pool
Ex.
def first_function(): pool = multiprocessing.Pool() . . pool.join() pool.close() def second_function(): pool = multiprocessing.Pool() . . pool.join() pool.close()
Is it more efficient to create one single Pool before the 2 functions start and then pass it like argument?
1.4m articles
1.4m replys
5 comments
57.0k users