Runs the polling process to AWS checks every 5 seconds.
184306
@Override
    public void run() {

        while (!registered) {
                GetOperationRequest operationRequest = new GetOperationRequest().withOperationId(operationId);
                GetOperationResult result = discoveryClient.getOperation(operationRequest);
                if (LOG.isInfoEnabled()) {
                    LOG.info("Service registration for operation " + operationId + " resulted in " + result.getOperation().getStatus());
                }
                if (result.getOperation().getStatus().equalsIgnoreCase("failure") || result.getOperation().getStatus().equalsIgnoreCase("success")) {
                    registered = true; // either way we are done
                    if (result.getOperation().getStatus().equalsIgnoreCase("failure")) {
                        if (route53AutoRegistrationConfiguration.isFailFast() && embeddedServerInstance instanceof EmbeddedServerInstance) {
                            if (LOG.isErrorEnabled()) {
                                LOG.error("Error registering instance shutting down instance because failfast is set.");
                            }
                            ((EmbeddedServerInstance) embeddedServerInstance).getEmbeddedServer().stop();
                        }
                    }
                }
            }
            try {
                Thread.currentThread().sleep(5000);
            } catch (InterruptedException e) {
                if (LOG.isErrorEnabled()) {
                    LOG.error("Registration monitor service has been aborted, unable to verify proper service registration on Route 53.", e);
                }
            }
        }
1120095
def serve_forever(self, poll_interval=0.5):
        
        self.serial_port.timeout = poll_interval

        while not self._shutdown_request:
            try:
                self.serve_once()
            except (CRCError, struct.error) as e:
                log.error('Can\'t handle request: {0}'.format(e))
            except (SerialTimeoutException, ValueError):
                pass
68685
public function run($checkInterval = self::CHECK_INTERVAL)
    {
        $this->startNext();

        $interval = (int) ($checkInterval * 1000000);
        while ($this->poll()) {
            usleep($interval);
        }

        return $this->isSuccessful();
    }
70227
def _start(self):
        
        try:
            self._polling_method.run()
        except Exception as err:
            self._exception = err

        finally:
            self._done.set()

        callbacks, self._callbacks = self._callbacks, []
        while callbacks:
            for call in callbacks:
                call(self._polling_method)
            callbacks, self._callbacks = self._callbacks, []
143855
void startPolling() {

        m_rpc.poll();
        if (m_command == null) {
            m_command = new PollingCommand();
            Scheduler.get().scheduleFixedDelay(m_command, POLLING_DELAY_MS);
        }
    }
711420
def run(self):
    """"""
    while True:
      try:
        self._poll_for_update()
      except RuntimeError as error:
        # Note that because logging triggers a call to notify_update(), by
        # logging a message, we automatically retry publishing the update
        # after an error occurs.
        if error.message == 'dictionary changed size during iteration':
          # These errors occur occasionally and it is infeasible to get rid of
          # them entirely unless data.convert_to_base_types() is made
          # thread-safe. Ignore the error and retry quickly.
          _LOG.debug('Ignoring (probably harmless) error in station watcher: '
                     '`dictionary changed size during iteration`.')
          time.sleep(0.1)
        else:
          _LOG.exception('Error in station watcher: %s', error)
          time.sleep(1)
      except Exception as error:  # pylint: disable=broad-except
        _LOG.exception('Error in station watcher: %s', error)
        time.sleep(1)
924202
def start_heartbeat(self):
        """"""
        self.stop_heartbeat()

        self._heartbeat_timer = periodic.Callback(self._heartbeat,
                                                  self._heartbeat_interval,
                                                  self.server.io_loop)
        self._heartbeat_timer.start()
175511
def run_async(self, time_limit):
        '''  '''

        self.background = time_limit
        results = self.run()
        return results, poller.AsyncPoller(results, self)
116339
def run(self):
        
        while True:
            self._event.clear()
            self._queue.get().run(self._event)
90092
def _schedule(self):
        ''''''
        if self._running:
            _logger.debug('')
            self._call_later_handle = self._event_loop.call_later(
                self._timeout, self._check)
48475
public function poll()
    {
        try {
            foreach ($this->getMonitoredQueues() as $queue) {
                $this->storeTubeStats($queue);
                $this->deploySonar($queue);

                if (! $this->isQueueOnline($queue)) {
                    continue;
                }

                if (! $this->isWaitTimeOk($queue)) {
                    continue;
                }

                if (! $this->isPendingCountOk($queue)) {
                    continue;
                }

                if (! $this->isFailedCountOk($queue)) {
                    continue;
                }
            }
        } catch (Exception $e) {
            $this->eye->logger()->error('Error during queue poll process', $e);
        }
    }
929860
async def _poll(self) -> None:
        """"""
        while True:
            await asyncio.sleep(self._poll_delta)
            for subproc in list(self._running_set):
                subproc._poll()
920064
def Run(self):
    """"""
    count = 0
    for count, input_data in enumerate(self.GetInput()):
      if count % 2000 == 0:
        logging.debug("%d processed.", count)
      args = (input_data, self.out_queue, self.token)
      self.thread_pool.AddTask(
          target=self.IterFunction, args=args, name=self.THREAD_POOL_NAME)

    while count >= 0:
      try:
        # We only use the timeout to wait if we got to the end of the Queue but
        # didn't process everything yet.
        out = self.out_queue.get(timeout=self.QUEUE_TIMEOUT, block=True)
        if out:
          yield out
          count -= 1
      except queue.Empty:
        break

    # Join and stop to clean up the threadpool.
    self.thread_pool.Stop(join_timeout=THREADPOOL_JOIN_TIMEOUT)
1145081
def run(self, switch_queue):
        
        self.switch_queue = switch_queue
        self.quit = False

        Thread(target=self._watchdog_queue).start()
        Thread(target=self._watchdog_time).start()
1251200
def run(self):
        """"""
        while not self._finished.isSet():
            self._func(self._reference)
            self._finished.wait(self._func._interval / 1000.0)
631583
def _polling_iteration(self):
		
		if self.__task is None:
			self.ready_event().set()
		elif self.__task.check_events() is True:
			self.ready_event().set()
			self.registry().task_finished(self)
466504
def run(self):
        
        self.stop = False
        while not self.stop:
            self.tracker.create_snapshot()
            sleep(self.interval)