def kill_process(self):
proc_list = []
while multiprocessing.active_children():
for p in multiprocessing.active_children():
if p.is_alive():
p.terminate()
proc_list.append(p.pid)
if self.is_alive():
self.terminate()
proc_list.append(self.pid)
print ("\nTerminated Autorepeat Processes:", *set(proc_list), sep=' ')
评论列表
文章目录