title: How to terminate Python's `ProcessPoolExecutor` when parent process dies?
body: <p>Is there a way to make the processes in <code>concurrent.futures.ProcessPoolExecutor</code> terminate if the parent process terminates for any reason?</p>
  <p>Some details: I'm using <code>ProcessPoolExecutor</code> in a job that processes a lot of data. Sometimes I need to terminate the parent process with a kill command, but when I do that the processes from <code>ProcessPoolExecutor</code> keep running and I have to manually kill them too. My primary work loop looks like this:</p>
  <pre><code>with concurrent.futures.ProcessPoolExecutor(n_workers) as executor:
      result_list = [executor.submit(_do_work, data) for data in data_list]
      for id, future in enumerate(
              concurrent.futures.as_completed(result_list)):
          print(f'{id}: {future.result()}')
  </code></pre>
  <p>Is there anything I can add here or do differently to make the child processes in <code>executor</code> terminate if the parent dies?</p>