code: def startall(self, wait=False, **kwdargs):
          self.logger.debug("startall called")
          with self.regcond:
              while self.status != 'down':
                  if self.status in ('start', 'up') or self.ev_quit.is_set():
                      self.logger.error("ignoring duplicate request to start thread pool")
                      return
                  self.logger.debug("waiting for threads: count=%d" %
                                    self.runningcount)
                  self.regcond.wait()
              if self.ev_quit.is_set():
                  return
              self.runningcount = 0
              self.status = 'start'
              self.workers = []
              if wait:
                  tpool = self
              else:
                  tpool = None
              self.logger.debug("starting threads in thread pool")
              for i in range(self.numthreads):
                  t = self.workerClass(self.queue, logger=self.logger,
                                       ev_quit=self.ev_quit, tpool=tpool,
                                       **kwdargs)
                  self.workers.append(t)
                  t.start()
              if wait:
                  while self.status != 'up' and not self.ev_quit.is_set():
                      self.logger.debug("waiting for threads: count=%d" %
                                        self.runningcount)
                      self.regcond.wait()
              else:
                  self.status = 'up'
              self.logger.debug("startall done")