stops the executing thread but does not kill the thread.
It can be restarted
517760
public synchronized void stop() {
        try {
            this.kill();
        } finally {
            this.killed = false;
            this.restartCondition.setUseless(false);
            this.restartCondition.setActive(false);
        }

    }
549264
@Override
    public final synchronized void stopService(long millis) {
        running = false;
        try {
            if (keepRunning) {
                keepRunning = false;
                interrupt();
                quit();
                if (0L == millis) {
                    join();
                } else {
                    join(millis);
                }
            }
        } catch (InterruptedException e) {
            //its possible that the thread exits between the lines keepRunning=false and interrupt above
            log.warn("Got interrupted while stopping {}", this, e);

            Thread.currentThread().interrupt();
        }
    }
6244
public void stop() throws Exception {
    if (mSecondaryMasterThread != null) {
      mSecondaryMaster.stop();
      while (mSecondaryMasterThread.isAlive()) {
        LOG.info("Stopping thread {}.", mSecondaryMasterThread.getName());
        mSecondaryMasterThread.join(1000);
      }
      mSecondaryMasterThread = null;
    }
    if (mMasterThread != null) {
      mMasterProcess.stop();
      while (mMasterThread.isAlive()) {
        LOG.info("Stopping thread {}.", mMasterThread.getName());
        mMasterThread.interrupt();
        mMasterThread.join(1000);
      }
      mMasterThread = null;
    }
    clearClients();
    System.clearProperty("alluxio.web.resources");
    System.clearProperty("alluxio.master.min.worker.threads");
  }
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;
  }
157532
void stopNow() {
        assert currentThread() != this : "stopNow must not be called on the migration thread";
        running = false;
        queue.clear();
        interrupt();
        boolean currentThreadInterrupted = false;
        while (true) {
            try {
                join();
            } catch (InterruptedException e) {
                currentThreadInterrupted = true;
                continue;
            }
            break;
        }
        if (currentThreadInterrupted) {
            currentThread().interrupt();
        }
    }
1168788
public synchronized void stop()
  {
    running.set(false);
    if(thread.isAlive()) {
      thread.interrupt();
      wait(this, STOP_TIMEOUT);
    }
  }
1119707
public void stop() {
    if (stopRequested) {
      return;
    }
    stopRequested = true;
    running = false;
    if (server != null) server.stop();
    if (triggerThread != null) triggerThread.interrupt();
    if (fileFixer != null) fileFixer.shutdown();
    if (fileFixerThread != null) fileFixerThread.interrupt();
    if (myMetrics != null) {
      myMetrics.shutdown();
    }
  }
398180
public void close() {
		if (thread == null) {
			closed = true;
		}

		running = false;

		if (thread != null) {
			thread.interrupt();
		}
	}
1099169
public void stopWhenDone() {
        Thread t = new Thread(new Runnable() {
            @Override
            public void run() {
                while (getCurrentRequests() > 0) {
                    try {
                        Thread.sleep(33);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                }
            }
        });
        t.start();

        try {
            t.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        stop();
    }
1149412
private void stop() {
        finish(inputThread);

        try {
            err.flush();
        } catch (IOException e) {
            // ignore
        }
        try {
            out.flush();
        } catch (IOException e) {
            // ignore
        }
        finish(outputThread);
        finish(errorThread);
    }
326924
public synchronized void stopThread()
	{
		if (isRunning())
		{
			if (log.isInfoEnabled())
				log.info("[Daemon] {stopThread} Requesting termination of thread " + thisThread.getName());

			this.running = false;

			synchronized (this)
			{
				this.notifyAll();
			}
		}
		else
		{
			throw new IllegalThreadStateException("Daemon must be started before it may be stopped.");
		}
	}
279151
private void stopBackgroundThread() {
		mBackgroundThread.quitSafely();
		try {
			mBackgroundThread.join();
			mBackgroundThread = null;
			mBackgroundHandler = null;
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
681514
def wait_until_exit(self):
        

        if self._timeout is None:
            raise Exception("Thread will never exit. Use stop or specify timeout when starting it!")

        self._thread.join()
        self.stop()
1242721
@Override
	public synchronized void stop() {
		this.logger.d("Stopping...");
		this.getGame().onStop();
		this.running = false;
		if (this.hasFrame) this.frame.dispose();
		try {
			this.thread.join(3000);
		} catch (InterruptedException e) {
			this.logger.e("Error exiting!", e);
			System.exit(-1);
		}
		this.logger.d("Stopped.");
		System.exit(0);
	}
1369047
def stop(self):
        
        for run_event in self.run_events:
            run_event.clear()

        for thread in self.thread_pool:
            thread.join()
1154268
def stop(self):
        
        if self._io_thread is not None:
            self.log.info("Waiting for I/O thread to stop...")
            self.closed = True
            self._io_thread.join()

        if self._writer_thread is not None:
            self.log.info("Waiting for Writer Thread to stop...")
            self.closed = True
            self._writer_thread.join()

        self.log.info("All worker threads stopped.")
1106330
def stop(self, timeout=1.0):
        
        if timeout:
            self._running.wait(timeout)
        self._running.clear()
        # Make sure to wake the run thread.
        self._wake.set()