{@link WebDriverSessionHandler#stop()} will stop the polling child thread.

@throws ExecutionException
thrown when exceptions occur in the child thread while polling.
761479
public void stop() throws ExecutionException {

        logger.exiting();

        if (!bStartSession) {
            throw new IllegalStateException("Please call startSession() before calling endSession()");
        }
        bStartSession = false;

        try {
            result.get();
        } catch (InterruptedException e) {
            logger.log(Level.SEVERE, "InterruptedException occured while pinging the WebDriver", e);
        }

        logger.exiting();
    }
95662
public synchronized void stop() {
        if (mConnectThread != null) {
            mConnectThread.cancel();
            mConnectThread = null;
        }

        if (mEngConnectedThread != null) {
            mEngConnectedThread.cancel();
            mEngConnectedThread = null;
        }
        setState(STATE_NONE);
    }
466120
@CommandArgument
  public void stop() {
    System.out.println("Stopping worker");
    worker.shutdown();
    workerThread.interrupt();
    try {
      workerThread.join();
    } catch (InterruptedException e) {
      logger.warn("Joining to worker thread interrupted", e);
    }
    worker = null;
    workerThread = null;
    taskProgressStates = null;
  }
703807
@Override
  public synchronized void stop() throws ApplicationException {
    if (!this.hasStarted) {
      LOG.warn("ApplicationLauncher was never started");
      return;
    }
    if (this.hasStopped) {
      LOG.warn("ApplicationLauncher has already stopped");
      return;
    }
    this.hasStopped = true;

    LOG.info("Shutting down the application");
    try {
      this.serviceManager.stopAsync().awaitStopped(this.stopTime, TimeUnit.SECONDS);
    } catch (TimeoutException te) {
      LOG.error("Timeout in stopping the service manager", te);
    }
  }
1121151
public void stop() {
        if (shutdownExecutorOnStop) {
            executor.shutdown(); // Disable new tasks from being submitted
            try {
                // Wait a while for existing tasks to terminate
                if (!executor.awaitTermination(1, TimeUnit.SECONDS)) {
                    executor.shutdownNow(); // Cancel currently executing tasks
                    // Wait a while for tasks to respond to being cancelled
                    if (!executor.awaitTermination(1, TimeUnit.SECONDS)) {
                        System.err.println(getClass().getSimpleName() + ": ScheduledExecutorService did not terminate");
                    }
                }
            } catch (InterruptedException ie) {
                // (Re-)Cancel if current thread also interrupted
                executor.shutdownNow();
                // Preserve interrupt status
                Thread.currentThread().interrupt();
            }
        } else {
            // The external manager(like JEE container) responsible for lifecycle of executor
            synchronized (this) {
                if (this.scheduledFuture == null) {
                    // was never started
                    return;
                }
                if (this.scheduledFuture.isCancelled()) {
                    // already cancelled
                    return;
                }
                // just cancel the scheduledFuture and exit
                this.scheduledFuture.cancel(false);
            }
        }
    }
332423
@Override
    public void terminate() throws RemoteException
    {
        furnace.stop();
        try
        {
            Thread.sleep(5000);
        }
        catch (InterruptedException e)
        {
        }
        Runtime.getRuntime().halt(1);
    }
947079
void stop() {
    stopAsync();
    try {
      // stopperThread is not null for sure
      // join() does nothing if thread already finished
      stopperThread.join();
      lifecycle.tryToMoveTo(Lifecycle.State.STOPPED);
    } catch (InterruptedException e) {
      Thread.currentThread().interrupt();
    }
    exit.exit(0);
  }
1080
public void stop() {
        executor.shutdown(); // Disable new tasks from being submitted
        try {
            // Wait a while for existing tasks to terminate
            if (!executor.awaitTermination(1, TimeUnit.SECONDS)) {
                executor.shutdownNow(); // Cancel currently executing tasks
                // Wait a while for tasks to respond to being cancelled
                if (!executor.awaitTermination(1, TimeUnit.SECONDS)) {
                    LOG.warn(getClass().getSimpleName() + ": ScheduledExecutorService did not terminate");
                }
            }
        } catch (InterruptedException ie) {
            // (Re-)Cancel if current thread also interrupted
            executor.shutdownNow();
            // Preserve interrupt status
            Thread.currentThread().interrupt();
        }
    }
1058001
@Override
    public void stop() throws InterruptedException, Exception {
        executor.shutdown();
        final boolean success = executor.awaitTermination(shutdownPeriod.getQuantity(), shutdownPeriod.getUnit());
        if (!success && LOG.isDebugEnabled()) {
            LOG.debug("Timeout has elapsed before termination completed for executor " + executor.toString());
        }
    }
175496
private void stop(RpcEndpointTerminationResult rpcEndpointTerminationResult) {
		if (rpcEndpointStopped.compareAndSet(false, true)) {
			this.rpcEndpointTerminationResult = rpcEndpointTerminationResult;
			getContext().stop(getSelf());
		}
	}
537644
@Stop(priority = 110)
   public void stop() {
      if (trace) {
         log.tracef("Stopping LocalTopologyManager on %s", transport.getAddress());
      }
      running = false;
      for (LocalCacheStatus cache : runningCaches.values()) {
         cache.getTopologyUpdatesExecutor().shutdownNow();
      }
      withinThreadExecutor.shutdown();
   }
27017
public void stop() {
        synchronized (this.startStopMonitor) {
            doStop();

            // If we registered a JVM shutdown hook, we don't need it anymore now:
            // We've already explicitly closed the context.
            if (this.shutdownHook != null) {
                try {
                    Runtime.getRuntime().removeShutdownHook(this.shutdownHook);
                } catch (final IllegalStateException ex) {
                    // ignore - VM is already shutting down
                }
            }
        }
    }
648086
public void stop() {
		if (serverThread != null) {
			try {
				//close and force IOException in server process
				server.close();
				//server thread will end as well
			} catch (IOException ioe) {
				System.out.println(new LogEntry(Level.CRITICAL, ioe.getMessage(), ioe));
			}
		}

		//close client connections as well
		for (Connection client : new HashSet<Connection>(connectedClients)) {
			if (!client.isClosed()) {
				client.close("server shut down...");
			}
		}
	}
1052465
public void stop() throws ServerLifecycleException {
		try {
			contextHandler.stop();
			contextHandlerCollection.removeHandler(contextHandler);
			contextHandlerCollection.mapContexts();
			LOG.info("WebDavServlet stopped: " + contextPath);
		} catch (Exception e) {
			throw new ServerLifecycleException("Servlet couldn't be stopped", e);
		}
	}
697226
public void stopThread(StoppableThreadCache threadCache)
  {
    if (tc.isEntryEnabled())
      SibTr.entry(tc, "stopThread", threadCache);
    
    synchronized (_messageProcessor.getDestinationManager().deletionThreadLock)
    {    
      // Allow the thread to finish the immediate job in hand before
      // returning.
      //set the thread to stopping, so that it'll stop if in progress
      // and no new instances will be started         
      setStopping();
  
      // Now wait till the thread's gone
      while (isRunning())
      {
        try
        {
          // wait for thread to end
          // I put a timeout on this - to handle the case where we've hung
          // in delete processing. The best thing in such a case is probably
          // to allow the whole process to exit.
  
          // But is 5 secs right? - NY
          _messageProcessor.getDestinationManager().deletionThreadLock.wait(5000);
          if (Thread.holdsLock(asynchLock)) asynchLock.wait(5000);
        }
        catch (InterruptedException iex)
        {
          // No FFDC code needed
          SibTr.exception(tc, iex);
        }
      }
    }
    
    // Remove this thread from the thread cache
    threadCache.deregisterThread(this);
   
    if (tc.isEntryEnabled())
      SibTr.exit(tc, "stopThread");
  }
116582
public void stop() throws Exception {
		if (server != null) {
			server.setStopTimeout(100);
			server.stop();
			server = null;
		}
	}
517103
@Override
    public void stop(){
        if (this.isStarted == false)
            return;
        synchronized (this) {
            if (this.isStarted == true) {
                getCache().refresh();
                this.isStarted = false;
            }
        }
    }