{@inheritDoc}

@see java.lang.Thread#run()
498727
@Override
    public void run () {
        try {
            this.closed = true;
            close();
        }
        catch ( CIFSException e ) {
            log.warn("Failed to close context on shutdown", e);
        }
    }
1304475
@Override
	public synchronized void run()
    {
        if (!start())
        	return;
        
        try
        {
        	inRunnableMode = true;
        	while (!stopRequired)
        		wait();
        }
        catch (InterruptedException e)
        {
        	log.error("Server was interrupted.");
        }
        
        shutdown();      
    }
462191
@Override
    public void run() {
        if (this.state.compareAndSet(NEW, RUNNING)) {
            try {
                renameThread("RUNNING");
                this.threadRef.set(Thread.currentThread());
                PoolUtils.doWorkInPool(this.jedisPool, new PoolWork<Jedis, Void>() {
                    /**
                     * {@inheritDoc}
                     */
                    @Override
                    public Void doWork(final Jedis jedis) throws IOException {
                        jedis.sadd(key(WORKERS), name);
                        jedis.set(key(WORKER, name, STARTED), new SimpleDateFormat(DATE_FORMAT).format(new Date()));
                        listenerDelegate.fireEvent(WORKER_START, WorkerPoolImpl.this, null, null, null, null, null);
                        loadRedisScripts(jedis);
                        return null;
                    }
                });
                poll();
            } catch (Exception ex) {
                LOG.error("Uncaught exception in worker run-loop!", ex);
                this.listenerDelegate.fireEvent(WORKER_ERROR, this, null, null, null, null, ex);
            } finally {
                renameThread("STOPPING");
                this.listenerDelegate.fireEvent(WORKER_STOP, this, null, null, null, null, null);
                PoolUtils.doWorkInPoolNicely(this.jedisPool, new PoolWork<Jedis, Void>() {
                    /**
                     * {@inheritDoc}
                     */
                    @Override
                    public Void doWork(final Jedis jedis) {
                        jedis.srem(key(WORKERS), name);
                        jedis.del(key(WORKER, name), key(WORKER, name, STARTED), key(STAT, FAILED, name),
                                key(STAT, PROCESSED, name));
                        return null;
                    }
                });
                this.threadRef.set(null);
            }
        } else if (RUNNING.equals(this.state.get())) {
            throw new IllegalStateException("This WorkerImpl is already running");
        } else {
            throw new IllegalStateException("This WorkerImpl is shutdown");
        }
    }
924376
@Override
    public void run() {
        try {
            MDC.put("name", name);
            log.info("Starting {}...", name);

            // Get a connection to the broker
            String brokerUrl = globalConfig.getString(
                    ActiveMQConnectionFactory.DEFAULT_BROKER_BIND_URL,
                    "messaging", "url");
            ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(
                    brokerUrl);
            connection = connectionFactory.createConnection();
            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
            consumer = session.createConsumer(session.createQueue(QUEUE_ID));
            consumer.setMessageListener(this);
            connection.start();

            // Solr
            solr = initCore("solr");
            // Timeout 'tick' for buffer (10s)
            timer = new Timer("SolrWrapper:" + toString(), true);
            timer.scheduleAtFixedRate(new TimerTask() {
                @Override
                public void run() {
                    checkTimeout();
                }
            }, 0, 10000);
        } catch (JMSException ex) {
            log.error("Error starting message thread!", ex);
        }
    }
1193102
public final void run() {
        int partitionCount = partitionService.getPartitionCount();
        latch = new CountDownLatch(partitionCount);

        for (int partitionId = 0; partitionId < partitionCount; partitionId++) {
            operationExecutor.execute(new CollectContainerRunnable(partitionId));
        }

        try {
            latch.await();
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
    }
305450
@Override
    public void run() {
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        subjectRepository.getSubjectsCollection(new SubjectRepository.SubjectListCallback() {
            @Override
            public void onSubjectListLoader(final Collection<Subject> subjects) {
                mainThread.post(new Runnable() {
                    @Override
                    public void run() {
                        callback.onSubjectListLoaded(subjects);
                    }
                });
            }

            @Override
            public void onError(final SubjectException exception) {
                mainThread.post(new Runnable() {
                    @Override
                    public void run() {
                        callback.onError(exception);
                        Log.i(getClass().toString(), "Error!");
                    }
                });
            }
        });
    }
336879
@Override
    public void run() {
        Collections.sort(files);
        for (int i = files.size() - 1; i >= 0; i--) {
            new File(files.get(i)).delete();
        }
    }
876601
public void run()
    {
        Folder folder = this.getInboxFolder();
        
        if (folder != null)
            this.processMail(folder);

        try {
            folder.close(true);
        } catch (MessagingException e) {
            e.printStackTrace();
        }
    }
358319
@Override
    public void run() {
        final ScheduledFuture<?> future = this.executor.scheduleWithFixedDelay(this.scheduled, 0, this.delayMillis,
                TimeUnit.MILLISECONDS);
        try {
            this.runTrigger.await();
        } catch (final InterruptedException e) {
            this.listener.handle(e);
        } finally {
            future.cancel(true); // stop the periodic reading
            this.scheduled.cleanup();
            this.executor.shutdownNow();
            this.listener.destroy();
        }
    }
890827
@SuppressWarnings("InfiniteLoopStatement")
  @Override
  public void run() {
    try {
      while (true) {
        try {
          cleanUp(queue.remove());
        } catch (InterruptedException e) { /* ignore */ }
      }
    } catch (ShutDown shutDown) { /* ignore */ }
  }
1143966
public void run()
   {
      this.currentThread = Thread.currentThread();
      this.running.set(true);

      while (this.running.get())
      {
         Task nextTask = null;
         try
         {
            if (_logger.isDebugEnabled())
               _logger.debug("Waiting for next task...");
            nextTask = this.taskSet.take();
            if (_logger.isDebugEnabled())
               _logger.debug("next from taskset is task: " + nextTask.getCommand());
            this.executor.submit(nextTask);
            if (_logger.isDebugEnabled())
               _logger.debug("submitted for execution command: " + nextTask.getCommand());
         }
         catch (InterruptedException e)
         {
            _logger.debug("Task manager thread interrupted.");
            this.running.set(false);
         }
         catch (Exception e)
         {
            _logger.debug("Task manager experienced an unhandled exception, shutting down");
            this.running.set(false);
         }
      }
      _logger.info("Shutting down task manager.");

      this.taskSet.clear();
      executor.shutdown();
   }
960104
public void run(Runnable runnable, Executor executor)
    {
        if (this.goForward())
        {
            for (int i = this.from; i <= this.to; i += this.step)
            {
                executor.execute(runnable);
            }
        }
        else
        {
            for (int i = this.from; i >= this.to; i += this.step)
            {
                executor.execute(runnable);
            }
        }
    }
74089
@Override
    public void run() {

        boolean runOnce = (m_runnable != null);

        while (m_run) {
            setPriority(m_pool.getThreadPriority());
            try {
                if (m_runnable == null) {
                    m_runnable = m_pool.getNextRunnable();
                }

                if (m_runnable != null) {
                    m_runnable.run();
                }
            } catch (InterruptedException e) {
                LOG.error(Messages.get().getBundle().key(Messages.LOG_THREAD_INTERRUPTED_1, getName()), e);
            } catch (Throwable t) {
                LOG.error(Messages.get().getBundle().key(Messages.LOG_THREAD_ERROR_1, getName()), t);
            } finally {
                if (runOnce) {
                    m_run = false;
                }
                m_runnable = null;
            }
        }
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_THREAD_SHUTDOWN_1, getName()));
        }
    }
1173230
@Override
  public void run() {
    synchronized (lock) {
      if (!callables.hasNext()) {
        checkEnd();
        return;
      }

      for (int i = 0; i < parallelism && callables.hasNext(); i++) {
        setupNext(callables.next());
      }
    }

    future.whenCancelled(() -> {
      cancel = true;
      checkNext();
    });
  }
1312990
@Override
    public synchronized void run() {
        try {
            notifier.beforePollingCycle(new BeforePollingCycleEvent(dp));
            if (!executor.isShutdown()) {
                executor.invokeAll(pollers);
            }
            notifier.afterPollingCycle(new AfterPollingCycleEvent(dp));
        } catch (InterruptedException e) {
            // allow thread to exit gracefully
        } catch (Throwable t) {
            LOG.error("Unexpected error!", t);
        }
    }
78527
@Override
	public void run() {
		// Flag to avoid checking the very first time, when the request handler
		// has just started.
		boolean firstRun = true;

		while (continuePolling) {
			try {
				// Must check before sleeping, otherwise stopPolling does not
				// work.
				if (!firstRun) {
					if (propertiesSource.configChanged()) {
						Properties props = propertiesSource.getConfigProperties();
						if (overriddenProperties != null) {
							props.putAll(overriddenProperties);
						}
						listener.configChanged(props);
					} else if (bundlesHandler != null && bundlesHandler.bundlesNeedToBeRebuild()) {
						listener.rebuildDirtyBundles();
					}
				}
				sleep(waitMillis);
				firstRun = false;

			} catch (InterruptedException e) {
				// Nothing to do
			} catch (InterruptBundlingProcessException e) {
				if (LOGGER.isInfoEnabled()) {
					LOGGER.info("Bundling processed stopped");
				}
			}
		}
		
		this.bundlesHandler = null;
		this.listener = null;
	}
1086472
@Override
  @SuppressWarnings("unchecked")
  public void run() {
    while (!this.shutdown) {
      try {
        this.lastThreadCheckTime = System.currentTimeMillis();
        this.updater.updateExecutions();
        // TODO not sure why it would be important to check the status immediately in case of _new_
        // executions. This can only optimize finalizing executions that finish super-quickly after
        // being started.
        waitForNewExecutions();
      } catch (final Exception e) {
        logger.error("Unexpected exception in updating executions", e);
      }
    }
  }