code: def shutdown(self):
          
          self.shutdownLocal()
          newJobsQueue = self.newJobsQueue
          self.newJobsQueue = None
  
          newJobsQueue.put(None)
          self.worker.join()
docs: Signals worker to shutdown (via sentinel) then cleanly joins the thread