Starts the adapter and keeps handling requests in a loop. This method never returns and will typically be
the last call in an adapter implementation script.
480169
public function run()
    {
        $this->init();

        // Loop forever, except when a maximum number of requests is configured
        $requestsHandled = 0;
        while ($this->maxRequests === null || $requestsHandled < $this->maxRequests) {
            $this->doStep();
            $requestsHandled++;
        }
    }
447349
def start(self):
        
        self.thread_handler.run(target=self.start_blocking)
        self.thread_handler.start_run_loop()
238229
def start(self):
        '''
        
        '''
        self._handler = _create_handler_class(self._rules, self._always_rules)
        self._server = HTTPServer(('', self._port), self._handler)
        self._thread = Thread(target=self._server.serve_forever, daemon=True)
        self._thread.start()
        self.running = True
        return self
422854
public void run() {
        Runnable r = null;
        while (true) {
            // Try to drain the maximum capacity of thread-local items, checking
            // whether any were available
            if (workQueue.drainTo(internalQueue, threadLocalItems) == 0) {
                // block until a work item is available
                try {
                    internalQueue.offer(workQueue.take());
                } catch (InterruptedException ie) {
                    throw new Error(ie);
                }
            }
            // Execute all of the thread-local items
            while ((r = internalQueue.poll()) != null)
                r.run();
        }
    }
488631
public synchronized void start() throws Exception
    {
        try
        {
            if (isStarted()) return;

            open();

            _running = true;
            _acceptor = new Acceptor[_acceptors];
            for (int a = 0; a < _acceptor.length; a++)
            {
                _acceptor[a] = new Acceptor();
                _acceptor[a].setDaemon(isDaemon());
                _acceptor[a].start();
            }

            super.start();
        }
        catch (Exception e)
        {
            log.warn("Failed to start: " + this);
            throw e;
        }
    }
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);
  }
1311874
public void start() throws Exception {
        // verify server is NOT null
        if (server == null) {
            throw new NullPointerException("Internal server instance was null, server not configured perhaps?");
        }

        logger.info("HttpServer [{}] version [{}] using Jetty [{}]", configuration.safeGetName(), com.cloudhopper.jetty.Version.getLongVersion(),
		    server.getVersion());
        logger.info("HttpServer [{}] on [{}] starting...", configuration.safeGetName(), configuration.getPortString());

        // try to start jetty server -- if it fails, it'll actually keep running
        // so if an exception occurs, we'll make to stop it afterwards and rethrow the exception
        try {
            server.start();
        } catch (Exception e) {
            // make sure we stop the server
            try { this.stop(); } catch (Exception ex) { }
            throw e;
        }

        logger.info("HttpServer [{}] on [{}] started", configuration.safeGetName(), configuration.getPortString());
    }
50052
public void start() {
    syncLock.lock();
    try {
      if (!this.isConfigured) {
        return;
      }
      instanceChangeStreamListener.stop();
      if (listenersEnabled) {
        instanceChangeStreamListener.start();
      }

      if (syncThread == null) {
        syncThread = new Thread(
            new DataSynchronizerRunner(
              new WeakReference<>(this),
              networkMonitor,
              logger
            ),
            "dataSynchronizerRunnerThread"
        );
      }
      if (syncThreadEnabled && !isRunning) {
        syncThread.start();
        isRunning = true;
      }
    } finally {
      syncLock.unlock();
    }
  }
1008544
public final void start() {
    if (this.started) {
      log.warn(String.format("Reporter %s has already been started.", this.name));
      return;
    }
    try {
      startImpl();
      this.started = true;
    } catch (Exception exception) {
      log.warn(String.format("Reporter %s did not start correctly.", this.name), exception);
    }
  }
266476
def thread_started(self):
		
		while self.check_events() is False:
			self._polling_iteration()
			self.stop_event().wait(self.polling_timeout())
711994
def application(handler, adapter_cls=WerkzeugAdapter):
    
    adapter = adapter_cls()

    def wrapper(environ, start_response):
        request = adapter.to_request(environ)
        response = handler(request)
        response_func = adapter.from_response(response)
        return response_func(environ, start_response)

    return wrapper
1201467
public void start()
    {
        pen.start();
        try
        {
            cache.start();
        }
        catch ( Exception e )
        {
            ThreadUtils.checkInterrupted(e);
            Throwables.propagate(e);
        }
    }
179476
public void start()
        throws Exception
    {
        _class=_httpHandler.getHttpContext().loadClass(_className);
        if(log.isDebugEnabled())log.debug("Started holder of "+_class);
    }
104203
protected void start() {
        // if a periodic execution throws an exception, future executions are suspended,
        // this task wraps the call in a try-catch block to prevent that. Errors are still propagated.
        final Runnable resilientTask = () -> {
            try {
                run();
            } catch (final Exception e) {
                logger.error("[{}] Error during timeout-initiated flush", name, e);
            }
        };

        scheduler.scheduleAtFixedRate(resilientTask, 0, batchTimeout + salt, TimeUnit.MILLISECONDS);
    }
741448
@Override
    public void start() {
        synchronized (this.lifecycleMonitor) {
            if (!isRunning()) {
                log.info("start: Starting ConnectorManager");
                try {
                    connector.start();
                } catch (ConfigError | RuntimeError ex) {
                    throw new ConfigurationException(ex.getMessage(), ex);
                } catch (Throwable ex) {
                    throw new IllegalStateException("Could not start the connector", ex);
                }

                running = true;
            }
        }
    }
92515
public void start()
        throws Exception
    {
        if (getHttpContext().getAuthenticator()==null)
        {
            // Find out the Authenticator.
            if (SecurityConstraint.__BASIC_AUTH.equalsIgnoreCase(_authMethod))
                getHttpContext().setAuthenticator(new BasicAuthenticator());
            else if (SecurityConstraint.__CERT_AUTH.equalsIgnoreCase(_authMethod))
                getHttpContext().setAuthenticator(new ClientCertAuthenticator());
            else
                log.warn("Unknown Authentication method:"+_authMethod);
        }
        
        super.start();
    }
772913
public void run() {
    try {
      log.info("{}#Start listing and watching...", apiTypeClass);

      ApiListType list = listerWatcher.list(new CallGeneratorParams(Boolean.FALSE, null, null));

      V1ListMeta listMeta = Reflect.listMetadata(list);
      String resourceVersion = listMeta.getResourceVersion();
      List<ApiType> items = Reflect.getItems(list);

      if (log.isDebugEnabled()) {
        log.debug("{}#Extract resourceVersion {} list meta", apiTypeClass, resourceVersion);
      }
      this.syncWith(items, resourceVersion);
      this.lastSyncResourceVersion = resourceVersion;

      if (log.isDebugEnabled()) {
        log.debug("{}#Start watching with {}...", apiTypeClass, lastSyncResourceVersion);
      }
      while (true) {
        if (!isActive.get()) {
          if (watch != null) {
            watch.close();
            return;
          }
        }

        try {
          if (log.isDebugEnabled()) {
            log.debug(
                "{}#Start watch with resource version {}", apiTypeClass, lastSyncResourceVersion);
          }
          watch =
              listerWatcher.watch(
                  new CallGeneratorParams(
                      Boolean.TRUE,
                      lastSyncResourceVersion,
                      Long.valueOf(Duration.ofMinutes(5).toMillis()).intValue()));
          watchHandler(watch);
        } catch (Throwable t) {
          log.info("{}#Watch connection get exception {}", apiTypeClass, t.getMessage());
          Throwable cause = t.getCause();
          // If this is "connection refused" error, it means that most likely apiserver is not
          // responsive.
          // It doesn't make sense to re-list all objects because most likely we will be able to
          // restart
          // watch where we ended.
          // If that's the case wait and resend watch request.
          if (cause != null && (cause instanceof ConnectException)) {
            log.info("{}#Watch get connect exception, retry watch", apiTypeClass);
            Thread.sleep(1000L);
            continue;
          }
          if ((t instanceof RuntimeException)
              && t.getMessage().contains("IO Exception during hasNext")) {
            log.info("{}#Read timeout retry list and watch", apiTypeClass);
            return;
          }
          log.error("{}#Watch failed as {} unexpected", apiTypeClass, t.getMessage(), t);
          return;
        } finally {
          if (watch != null) {
            watch.close();
            watch = null;
          }
        }
      }
    } catch (Throwable t) {
      log.error("{}#Failed to list-watch: {}", apiTypeClass, t);
    }
  }