code: def join(self, timeout=None):
          
          if self._context.state == RUNNING:
              raise RuntimeError('The Pool is still running')
          if self._context.state == CLOSED:
              self._wait_queue_depletion(timeout)
              self.stop()
              self.join()
          else:
              self._context.task_queue.put(None)
              self._stop_pool()
docs: Joins the pool waiting until all workers exited.
  
          If *timeout* is set, it block until all workers are done
          or raises TimeoutError.