I have some very simple python code that runs a bunch of inputs through various processes via ThreadPoolExecutor(). Now, sometimes one or more of the threads dies quietly. It is actually great that the rest of the threads continue on and the code completes, but I would like to put together some type of summary that tells me which, if any, of the threads have died.
I've found several examples where folks want the whole thing to shut down, but haven't seen anything yet where the process continues on and the threads that have hit errors are just reported on after the fact.
Any/all thoughts greatly appreciated!
Thanks!
import concurrent.futures as cf
with cf.ThreadPoolExecutor() as executor:
executor.map(process_a, process_a_inputs)
executor.map(process_b, process_b_inputs)