Starts processing the items queue. This method can be called only once.

@param isDaemon Specifies whether underlying thread will be daemon thread.
483168
public void start(boolean isDaemon) {
        synchronized (this) {
            if (!isUsed) {
                isUsed = true;
                isRunning = true;
                Thread thread = new Thread(new RunnableImpl());
                thread.setDaemon(isDaemon);
                thread.start();
            } else {
                throw new IllegalStateException("Async runner has been already used once.");
            }
        }
    }
826594
public void start(@Nullable final DownloadListener listener, boolean isSerial) {
        final long startTime = SystemClock.uptimeMillis();
        Util.d(TAG, "start " + isSerial);
        started = true;
        final DownloadListener targetListener;
        if (contextListener != null) {
            targetListener = new DownloadListenerBunch.Builder()
                    .append(listener)
                    .append(new QueueAttachListener(this, contextListener, tasks.length))
                    .build();
        } else {
            targetListener = listener;
        }

        if (isSerial) {
            final List<DownloadTask> scheduleTaskList = new ArrayList<>();
            Collections.addAll(scheduleTaskList, tasks);
            Collections.sort(scheduleTaskList);
            executeOnSerialExecutor(new Runnable() {
                @Override public void run() {
                    for (DownloadTask task : scheduleTaskList) {
                        if (!isStarted()) {
                            callbackQueueEndOnSerialLoop(task.isAutoCallbackToUIThread());
                            break;
                        }
                        task.execute(targetListener);
                    }
                }
            });
        } else {
            DownloadTask.enqueue(tasks, targetListener);
        }
        Util.d(TAG,
                "start finish " + isSerial + " " + (SystemClock.uptimeMillis() - startTime) + "ms");
    }
756002
public void asyncOperationStarted() {
    if (syncThread == Thread.currentThread()) {
      synchronized (entry) {
        while (entry.isProcessing()) {
          try {
            entry.wait();
          } catch (InterruptedException ex) {
            Thread.currentThread().interrupt();
          }
        }
      }
    } else {
      entryLocked = false;
    }
  }
136238
void start() throws JMSException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "start");

        synchronized (stateLock) {

            // We will start each consumer inside its own catch block so that
            // the failing of a single consumer does not adversely affect any
            // other. The first exception that is received is stored in this
            // variable and will be passed back up to the Connection when all
            // the starts are complete.
            JMSException excReceived = null;

            // Start all the synchronous consumers

            // Take a copy of the list of synchronous consumers. A sync block in
            // createConsumer means that you cannot add anything to this list until
            // session.start completes, however consumers can still be removed (as
            // a result of the consumer.close operation), so by the time we get to
            // calling start on the elements in this list, some of them may already
            // be closed (pathalogical scenario). Calling start on a closed consumer
            // has no effect, so this shouldn't cause a problem.
            Object[] syncList = syncConsumers.toArray();

            for (int i = 0; i < syncList.length; i++) {
                try {
                    ((JmsMsgConsumerImpl) syncList[i]).start();
                } catch (JMSException e) {
                    // No FFDC code needed
                    // Cache the exception to be thrown back at the end of the method,
                    // but don't take any other action here. The exception will already
                    // have been logged in JmsMsgConsumerImpl.start.
                    if (excReceived == null) {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                            SibTr.debug(this, tc, "JMSException received at Session.start. Will continue trying to start the remaining consumers.");
                        // Cache this exception for later use.
                        excReceived = e;
                    }
                }
            }

            // Start all the asynchronous consumers.
            Iterator asyncList = asyncConsumers.iterator();
            while (asyncList.hasNext()) {
                try {
                    ((JmsMsgConsumerImpl) asyncList.next()).start();
                } catch (JMSException e) {
                    // No FFDC code needed

                    // Cache the exception to be thrown back at the end of the method,
                    // but don't take any other action here. The exception will already
                    // have been logged in JmsMsgConsumerImpl.start.
                    if (excReceived == null) {
                        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                            SibTr.debug(this, tc, "JMSException received at Session.start. Will continue trying to start the remaining asynch consumers.");
                        // Cache this exception for later use.
                        excReceived = e;
                    }
                }
            }

            // Check whether an exception was thrown at any point during this method.
            if (excReceived != null) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                    SibTr.debug(this, tc, "An exception was received during Session.start. Propogate to Connection.");
                throw excReceived;
            }

            // Flag that we have started everything.
            setState(STARTED);

        } // Release the lock

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "start");
    }
1339992
public void start(final int timeout, boolean daemon) throws IOException {
        this.myServerSocket = this.getServerSocketFactory().create();
        this.myServerSocket.setReuseAddress(true);

        ServerRunnable serverRunnable = createServerRunnable(timeout);
        this.myThread = new Thread(serverRunnable);
        this.myThread.setDaemon(daemon);
        this.myThread.setName("NanoHttpd Main Listener");
        this.myThread.start();
        while (!serverRunnable.hasBinded && serverRunnable.bindException == null) {
            try {
                Thread.sleep(10L);
            } catch (Throwable e) {
                // on android this may not be allowed, that's why we
                // catch throwable the wait should be very short because we are
                // just waiting for the bind of the socket
            }
        }
        if (serverRunnable.bindException != null) {
            throw serverRunnable.bindException;
        }
    }
420176
public void process(final boolean asynch)
          throws NotificationException {
    if (asynch) {
      try {
        consumer.setMessageListener(this);
        return;
      } catch (final JMSException je) {
        throw new NotificationException(je);
      }
    }

    while (running) {
      final Message m = conn.receive();

      if (m == null) {
        running = false;
        return;
      }
      onMessage(m);
    }
  }
271962
public void start()
    throws Exception
  {
    if (_port < 0 && _unixPath == null) {
      return;
    }

    if (! _lifecycle.toStarting())
      return;

    boolean isValid = false;
    try {
      bind();
      postBind();

      enable();

      _acceptTask = new AcceptTcp(this, _serverSocket);
      _threadPool.execute(_acceptTask);

      // _connThreadPool.start();

      _suspendAlarm = new Alarm(new SuspendReaper());
      _suspendAlarm.runAfter(_suspendReaperTimeout);

      isValid = true;
    } finally {
      if (! isValid) {
        close();
      }
    }
  }
411209
def start_if_necessary(self):
        
        self.lock.acquire()
        try:
            if not self.listening:
                self.init()

                self.listening = True
                self.listening_thread = Thread(target=self.listen)
                self.listening_thread.daemon = True
                self.listening_thread.start()

                self.processing_thread = Thread(target=self.process)
                self.processing_thread.daemon = True
                self.processing_thread.start()
        finally:
            self.lock.release()
153662
public synchronized void start()
        throws Exception
    {
        if (_running)
        {
            log.debug("Already started");
            return;
        }
        _running=true;
        if (_thread==null)
        {
            _thread=new Thread(this);
            _thread.setDaemon(_daemon);
        }
        _thread.start();
    }
661489
private void startConsumerThread() {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                while (Boolean.TRUE) {
                    processQueue();
                }
            }
        }, "ESMetricsConsumer"); //$NON-NLS-1$
        thread.setDaemon(true);
        thread.start();        
    }
985215
def run_thread(self):
        """"""
        self._run_thread = True
        self._thread.setDaemon(True)
        self._thread.start()
483133
@Override
	public void start () {
		if (semaphore == null) {
			semaphore = NonBlockingSemaphoreRepository.getSemaphore(name);
		}
		semaphoreAcquired = semaphore.acquire();
		super.start();
	}
153987
def _spawn(self):
        
        self.queue = Queue(maxsize=self.num_threads * 10)
        for i in range(self.num_threads):
            t = Thread(target=self._consume)
            t.daemon = True
            t.start()
10366
def process_queue_item      #:nodoc:
      return false if @queue.empty?

      # Even though we just asked if the queue was empty, it
      # still could have had an item which by this statement
      # is now gone. For this reason we pass true to Queue#deq
      # because we will sleep indefinitely if it is empty.
      promise = @queue.deq(true)
      stat :dequeued, item_id: promise.object_id
      promise.work
      return true

    rescue ThreadError # this means the queue is empty
      false
    end
881885
public static Thread startDaemon(Thread self, Closure closure) {
        return createThread(null, true, closure);
    }
1120734
public void run ()
    {
        log.info("DOMGR running.");

        // make a note of the thread that's processing events
        synchronized (this) {
            _dobjThread = Thread.currentThread();
        }

        while (isRunning()) {
            // pop the next unit off the queue and process it
            processUnit(_evqueue.get());
        }

        log.info("DOMGR exited.");
    }
265097
def _run_parallel_process(self, start_path, stop_path, queue):
        
        process_num = int(current_process().name.split('-', 2)[1])
        self._run_process(start_path, stop_path, process_num)
        queue.put(self.consumer.put())