class_docstr: Class to manage a pool of backgrounded threaded jobs.
  
  Below, we assume that 'jobs' is a BackgroundJobManager instance.
  
  Usage summary (see the method docstrings for details):
  
    jobs.new(...) -> start a new job
    
    jobs() or jobs.status() -> print status summary of all jobs
  
    jobs[N] -> returns job number N.
  
    foo = jobs[N].result -> assign to variable foo the result of job N
  
    jobs[N].traceback() -> print the traceback of dead job N
  
    jobs.remove(N) -> remove (finished) job N
  
    jobs.flush() -> remove all finished jobs
    
  As a convenience feature, BackgroundJobManager instances provide the
  utility result and traceback methods which retrieve the corresponding
  information from the jobs list:
  
    jobs.result(N) <--> jobs[N].result
    jobs.traceback(N) <--> jobs[N].traceback()
  
  While this appears minor, it allows you to use tab completion
  interactively on the job manager instance.
docstr: Update the status of the job lists.
  
  This method moves finished jobs to one of two lists:
    - self.completed: jobs which completed successfully
    - self.dead: jobs which finished but died.
  
  It also copies those jobs to corresponding _report lists.  These lists
  are used to report jobs completed/dead since the last update, and are
  then cleared by the reporting function after each call.
docstr_tok: ["Update","the","status","of","the","job","lists",".","This","method","moves","finished","jobs","to","one","of","two","lists",":","-","self.completed",":","jobs","which","completed","successfully","-","self.dead",":","jobs","which","finished","but","died",".","It","also","copies","those","jobs","to","corresponding","_report","lists",".","These","lists","are","used","to","report","jobs","completed\/dead","since","the","last","update",",","and","are","then","cleared","by","the","reporting","function","after","each","call","."]
code: def _update_status(self):
      """Update the status of the job lists.
  
      This method moves finished jobs to one of two lists:
        - self.completed: jobs which completed successfully
        - self.dead: jobs which finished but died.
  
      It also copies those jobs to corresponding _report lists.  These lists
      are used to report jobs completed/dead since the last update, and are
      then cleared by the reporting function after each call."""
  
      # Status codes
      srun, scomp, sdead = (
          self._s_running,
          self._s_completed,
          self._s_dead,
      )
      # State lists, use the actual lists b/c the public names are properties
      # that call this very function on access
      running, completed, dead = (
          self._running,
          self._completed,
          self._dead,
      )
  
      # Now, update all state lists
      for num, job in enumerate(running):
          stat = job.stat_code
          if stat == srun:
              continue
          elif stat == scomp:
              completed.append(job)
              self._comp_report.append(job)
              running[num] = False
          elif stat == sdead:
              dead.append(job)
              self._dead_report.append(job)
              running[num] = False
      # Remove dead/completed jobs from running list
      running[:] = filter(None, running)
  
imports: from __future__ import print_function
  import sys
  import threading
  from IPython import get_ipython
  from IPython.core.ultratb import AutoFormattedTB
  from logging import error
  from IPython.utils.py3compat import string_types
label_desc: Use image node_id 8 for calling the BackgroundJobManager obj's underlying member method code with example usage: obj._update_status() without return types