Starts the #ThreadPool. Must be ended with #stop(). Use the context-manager
    interface to ensure starting and the #ThreadPool.
336021
def start(self):
    

    if self.__running:
      raise RuntimeError('ThreadPool already running')
    [t.start() for t in self.__threads]
    self.__running = True
1088104
void start() {
    /* make sure any currently running dispatchers are stopped */
    stop();

    /* create the download dispatcher and start it. */
    for (int i = 0; i < dispatchers.length; i++) {
      DownloadDispatcher dispatcher = new DownloadDispatcher(downloadQueue, delivery, logger);
      dispatchers[i] = dispatcher;
      dispatcher.start();
    }

    logger.log("Thread pool size: " + dispatchers.length);
  }
17663
def start(self):
        
        with self._operational_lock:
            if self.is_alive:
                return

            self._thread = threading.Thread(
                target=self._thread_main, name=_WORKER_THREAD_NAME
            )
            self._thread.daemon = True
            self._thread.start()
            atexit.register(self._main_thread_terminated)
241213
def start(self):
		
		if self._thread_running.is_set():
			raise RuntimeError('the JobManager has already been started')
		self._thread.start()
		self._thread_running.wait()
		return
436748
def start(self):
        
        self.running = True
        self.thread = threading.Thread(target=self._main_loop)
        self.thread.start()
478877
def start(self):
        
        if self.isThreadsRunning:
            raise ThreadManagerException("Broker threads are already running")
        self.isThreadsRunning = True
        for client in self.clients:
            threading.Thread(target = client).start()
212841
def start
      self.sort_queues!

      for i in (1..max_threads)
        @threads << Thread.new(i) do
          worker = QueueWorker.new
          worker.delay = @delay
          worker.retry_count = @retry_count
          worker.run
        end
      end
    end
111218
def _start_workers(self):
        
        # creating the pool of worker process or threads
        log.debug('%s starts a %s-pool of %s workers.' % \
                  (self, self.worker_type, self.worker_num))
        self.pool = []
        for host, worker_num in \
                           [(None, self.worker_num)] + list(self.worker_remote):
            for _worker in range(worker_num):
                __worker = Thread(target=_pool_worker, args=\
                                  (self._inqueue, self._outqueue, host)) \
                                  if self.worker_type == 'thread' else \
                           Process(target=_pool_worker, args=\
                                  (self._inqueue, self._outqueue, host))
                self.pool.append(__worker)
        for __worker in self.pool:
            __worker.daemon = True
            __worker.start()
        log.debug('%s started the pool' % self)
46392
def start(self):
        
        if not self._done_event.is_set():
            # Stop event not set: we're running
            return

        # Clear the stop event
        self._done_event.clear()

        # Compute the number of threads to start to handle pending tasks
        nb_pending_tasks = self._queue.qsize()
        if nb_pending_tasks > self._max_threads:
            nb_threads = self._max_threads
            nb_pending_tasks = self._max_threads
        elif nb_pending_tasks < self._min_threads:
            nb_threads = self._min_threads
        else:
            nb_threads = nb_pending_tasks

        # Create the threads
        for _ in range(nb_pending_tasks):
            self.__nb_pending_task += 1
            self.__start_thread()
        for _ in range(nb_threads - nb_pending_tasks):
            self.__start_thread()
209246
def run(self):
    
    while True:
      if self.pool.name:
        self.idle = True

      try:
        # Wait 60 seconds for a message, otherwise exit. This ensures that the
        # threadpool will be trimmed down when load is light.
        task = self._queue.get(timeout=60)

        if self.pool.name:
          self.idle = False

        try:
          # The pool told us to quit, likely because it is stopping.
          if task == STOP_MESSAGE:
            return

          self.ProcessTask(*task)
        finally:
          self._queue.task_done()

      except queue.Empty:
        if self._RemoveFromPool():
          return

      # Try to trim old threads down when they get too old. This helps the
      # thread pool size to shrink, even when it is not idle (e.g. if it is CPU
      # bound) since threads are forced to exit, but new threads will not be
      # created if the utilization is too high - resulting in a reduction of
      # threadpool size under CPU load.
      if time.time() - self.started > 600 and self._RemoveFromPool():
        return
1032837
def start_with_retry(current_thread: false, **retryable_options)
      unless started?
        @retryable_options.set(retryable_options)
        start(current_thread: current_thread)
      end
      self
    end
1236666
def _start(self, worker=None):
        """"""
        if worker:
            self._queue_workers.append(worker)

        if self._queue_workers and self._running_threads < self._max_threads:
            #print('Queue: {0} Running: {1} Workers: {2} '
            #       'Threads: {3}'.format(len(self._queue_workers),
            #                                 self._running_threads,
            #                                 len(self._workers),
            #                                 len(self._threads)))
            self._running_threads += 1
            worker = self._queue_workers.popleft()
            thread = QThread()
            if isinstance(worker, PythonWorker):
                worker.moveToThread(thread)
                worker.sig_finished.connect(thread.quit)
                thread.started.connect(worker._start)
                thread.start()
            elif isinstance(worker, ProcessWorker):
                thread.quit()
                worker._start()
            self._threads.append(thread)
        else:
            self._timer.start()

        if self._workers:
            for w in self._workers:
                if w.is_finished():
                    self._bag_collector.append(w)
                    self._workers.remove(w)

        if self._threads:
            for t in self._threads:
                if t.isFinished():
                    self._threads.remove(t)
                    self._running_threads -= 1

        if len(self._threads) == 0 and len(self._workers) == 0:
            self._timer.stop()
            self._timer_worker_delete.start()
985603
public void start() {
        FixedSchedulerPool update = new FixedSchedulerPool(poolSize);
        if (!pool.compareAndSet(NONE, update)) {
            update.shutdown();
        }
    }
803465
def _start(self):
        

        # Initialize the locks
        self._recv_lock = coros.Semaphore(0)
        self._send_lock = coros.Semaphore(0)

        # Boot the threads
        self._recv_thread = gevent.spawn(self._recv)
        self._send_thread = gevent.spawn(self._send)

        # Link the threads such that we get notified if one or the
        # other exits
        self._recv_thread.link(self._thread_error)
        self._send_thread.link(self._thread_error)
947960
def start(self):
        
        if not self._is_running:
            self._do_run = True
            self._thread.start()
        return self
1152544
private void stopThreadPool(ExecutorService threadPool) {
        LibraryUtils.checkCondition(threadPool == null, "Thread pool is null when calling stop");

        if (threadPool.isShutdown()) {
            logger.debug(threadPool.toString() + " is already stopped.");

        } else {

            logger.debug(threadPool.toString() + " is about to shutdown.");
            threadPool.shutdown(); // Shutdown thread pool

            try { // Wait for shutdown
                threadPool.awaitTermination(config.getThreadTerminationDelaySeconds(), TimeUnit.SECONDS);
            } catch (InterruptedException e) {
                logger.debug("Wait thread pool termination is interrupted.");
            }

            if (!threadPool.isShutdown()) { // ShutdownNow after waiting
                logger.debug(threadPool.toString() + " is force to shutdown now.");
                threadPool.shutdownNow();
            }

            logger.debug(threadPool.toString() + " is stopped.");
        }
    }
1201467
public void start()
    {
        pen.start();
        try
        {
            cache.start();
        }
        catch ( Exception e )
        {
            ThreadUtils.checkInterrupted(e);
            Throwables.propagate(e);
        }
    }