class_docstr: Safe Queue set exception to the future object linked to a job
class_docstr_tok: ["Safe","Queue","set","exception","to","the","future","object","linked","to","a","job"]
code: def _on_queue_feeder_error(self, e, obj):
      if isinstance(obj, _CallItem):
          tb = format_exception(type(e), e, e.__traceback__)
          e.__cause__ = _RemoteTraceback(
              '\n"""\n{}"""'.format("".join(tb))
          )
          work_item = self.pending_work_items.pop(obj.work_id, None)
          with self.shutdown_lock:
              self.thread_wakeup.wakeup()
          # work_item can be None if another process terminated. In this
          # case, the executor_manager_thread fails all work_items
          # with BrokenProcessPool
          if work_item is not None:
              work_item.future.set_exception(e)
      else:
          super()._on_queue_feeder_error(e, obj)
  
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 2 for calling the _SafeQueue obj's underlying member method code with example usage: obj._on_queue_feeder_error(e, obj) without return types