code: def wait(self, timeout=None):
      
  
      tbegin = _get_timeout_begin(timeout)
      with self._lock:
        while self._queue or self._running:
          remainder = _get_timeout_remainder(tbegin, timeout)
          if remainder is not None and remainder <= 0.0:
            return False  # timeout
          self._lock.wait(remainder)
        if self._shutdown:
          for worker in self._workers:
            worker.join()
      return True
docs: Wait until all futures are completed. You should call this method only
      after calling #shutdown(). Returns #False if all futures are complete,
      #False if there are still some running.