class_docstr: Manages the communication between this process and the worker processes.
  
  The manager is run in a local thread.
  
  Args:
      executor: A reference to the ProcessPoolExecutor that owns
          this thread. A weakref will be own by the manager as well as
          references to internal objects used to introspect the state of
          the executor.
class_docstr_tok: ["Manages","the","communication","between","this","process","and","the","worker","processes",".","The","manager","is","run","in","a","local","thread",".","Args",":","executor",":","A","reference","to","the","ProcessPoolExecutor","that","owns","this","thread",".","A","weakref","will","be","own","by","the","manager","as","well","as","references","to","internal","objects","used","to","introspect","the","state","of","the","executor","."]
code: def terminate_broken(self, cause):
      # Terminate the executor because it is in a broken state. The cause
      # argument can be used to display more information on the error that
      # lead the executor into becoming broken.
  
      # Mark the process pool broken so that submits fail right now.
      executor = self.executor_reference()
      if executor is not None:
          executor._broken = (
              "A child process terminated "
              "abruptly, the process pool is not "
              "usable anymore"
          )
          executor._shutdown_thread = True
          executor = None
  
      # All pending tasks are to be marked failed with the following
      # BrokenProcessPool error
      bpe = BrokenProcessPool(
          "A process in the process pool was "
          "terminated abruptly while the future was "
          "running or pending."
      )
      if cause is not None:
          bpe.__cause__ = _RemoteTraceback(
              f"\n'''\n{''.join(cause)}'''"
          )
  
      # Mark pending tasks as failed.
      for work_id, work_item in self.pending_work_items.items():
          work_item.future.set_exception(bpe)
          # Delete references to object. See issue16284
          del work_item
      self.pending_work_items.clear()
  
      # Terminate remaining workers forcibly: the queues or their
      # locks may be in a dirty state and block forever.
      for p in self.processes.values():
          p.terminate()
  
      # Prevent queue writing to a pipe which is no longer read.
      # https://github.com/python/cpython/issues/94777
      self.call_queue._reader.close()
  
      # gh-107219: Close the connection writer which can unblock
      # Queue._feed() if it was stuck in send_bytes().
      if sys.platform == "win32":
          self.call_queue._writer.close()
  
      # clean up resources
      self.join_executor_internals()
  
imports: import os
  from concurrent.futures import _base
  import queue
  import multiprocessing
  import multiprocessing.connection
  from multiprocessing.queues import Queue
  import threading
  import weakref
  from functools import partial
  import itertools
  import sys
  from traceback import format_exception
label_desc: Use image node_id 7 for calling the _ExecutorManagerThread obj's underlying member method code with example usage: obj.terminate_broken(cause) without return types