try:
    do_other_stuff_for_a_bit()
except MyException as exc:
    print(exc)
print('Now stopping all processes...')
for p in procs:
    p.terminate()
print('The rest of the process will continue')
Остановка процессов в ThreadPool в Python