I have a Pool of tasks in my code, I want an event to happen once all the tasks in the pool are done. I know about join method but it is stopping my main process of tkinter app, I used a list of Processes and I checked that list using thread whether all the processes are done
Right now I am trying to do like this :
my_pool = [mp.Process(task).start() for task in tasks]
# checking if any process alive using a after method of tkinter
if not any(p.is_alive() for p in my_pool):
# doing some event
I wonder if there is a way to do the same using mp.Pool
instead of join()
, because it is pausing the main UI of my app until all the process is done in that pool.