Answer the question
In order to leave comments, you need to log in
Why is terminating a process not working?
I am using multiprocessing .
In a simplified form, the code looks like this:
class MainProcess(mp.Process):
def run(self):
self.proc1 = mp.Process(target=function1, args=(....))
self.proc2 = mp.Process(target=function2, args=(....))
self.proc3 = mp.Process(target=function3, args=(....))
self.proc4 = mp.Process(target=function4, args=(....))
def terminate(self):
self.proc1.terminate()
self.proc2.terminate()
self.proc3.terminate()
self.proc4.terminate()
Answer the question
In order to leave comments, you need to log in
No need to end processes. They need to know for themselves when they're done.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question