Calling this method will stop all threads. This is needed when using
JavaFX on mobile devices when the device goes to sleep mode.
181946
public void stop() {
        setLedOn(false);
        if (null != blinkFuture) { blinkFuture.cancel(true); }
        if (null != blinkService) { blinkService.shutdownNow(); }
    }
278072
def stop(self):
        '''
        
        '''
        self._stop_event.set()
        if self._func_stop_event is not None:
            self._func_stop_event.set()
        self.join(timeout=1)
        if self.isAlive():
            print('Failed to stop thread')
931985
public void stop() {
		resume();
		final Thread thread = _thread;
		if (thread != null) {
			thread.interrupt();
			try {
				thread.join();
			} catch (InterruptedException e) {
				Thread.currentThread().interrupt();
			} finally {
				_thread = null;
			}
		}
	}
641536
public void stop() throws IOException {
		synchronized (this.monitor) {
			if (this.serverThread != null) {
				this.serverThread.close();
				try {
					this.serverThread.join(2000);
				}
				catch (InterruptedException ex) {
					Thread.currentThread().interrupt();
				}
				this.serverThread = null;
			}
		}
	}
83288
public synchronized void stop() {

        if (m_thread != null) {
            long timeBeforeShutdownWasCalled = System.currentTimeMillis();
            JLANServer.shutdownServer(new String[] {});
            while (m_thread.isAlive()
                && ((System.currentTimeMillis() - timeBeforeShutdownWasCalled) < MAX_SHUTDOWN_WAIT_MILLIS)) {
                try {
                    Thread.sleep(500);
                } catch (InterruptedException e) {
                    // ignore
                }
            }
        }

    }
1357472
public void stop() {
        if (!this.isActive) {
            return;
        }

        cpuThread.shutdown();

        try {
            Thread.sleep(40);
        } catch (InterruptedException e) {
        }

        for (int i = 0; i < taskQueues.length; i++)
            taskQueues[i].clear();

        heartBeatQueue.clear();
    }
1114368
synchronized public void stop() {
    process = false;
    BlockEncodeRequest temp = new BlockEncodeRequest();
    temp.setAll(null, -1, -1, -1, -1, null);
    int count = frameThreadMap.size();
    for(int i = 0; i < count; i++) {
      unassignedEncodeRequests.add(temp);
    }
  }
388817
@Override
  public void stop() {
    if (!mIsRunning) {
      return;
    }
    mIsRunning = false;
    mStartTimeMs = 0;
    mExpectedRenderTimeMs = mStartTimeMs;
    mLastFrameAnimationTimeMs = -1;
    mLastDrawnFrameNumber = -1;
    unscheduleSelf(mInvalidateRunnable);
    mAnimationListener.onAnimationStop(this);
  }
294425
public void stop() {
        started = false;
        senderSessionPool.close();
        receiverSessionPool.close();
        listenerConsumers.forEach(Util::closeQuietly);
        listenerSessions.forEach(Util::closeQuietly);

        closeQuietly(producerConnection);
        closeQuietly(consumerConnection);

        try {
            ActiveMQServerControl control = jmsServer.getActiveMQServer().getActiveMQServerControl();
            String[] remoteAddresses = control.listRemoteAddresses();
            for (String address : remoteAddresses) {
                control.closeConnectionsForAddress(address);
            }
        } catch (Exception e) {
            LOGGER.warn("exception trying to close remote connections.", e);
        }
        try {
            jmsServer.stop();
        } catch (Exception e) {
            LOGGER.warn("exception trying to stop broker.", e);
        }
    }
780584
public synchronized void stop() {
		running = false;
		pool.shutdown();
		try {
			if (!pool.awaitTermination(60, TimeUnit.SECONDS))
				pool.shutdownNow();
			if (!serverSocket.isClosed())
				this.serverSocket.close();
		} catch (IOException e) {
			DBP.printerror("Error closing Socket.");
			DBP.printException(e);
		} catch (InterruptedException ie) {
			DBP.printerror("Error shutting down threadpool.");
			DBP.printException(ie);
			// (Re-)Cancel if current thread also interrupted
			pool.shutdownNow();
			// Preserve interrupt status
			Thread.currentThread().interrupt();
		}
	}
380064
public final void stop() {
        if (this.thread != null) {
            try {
                if (this.thread != null) {
                    this.thread.interrupt();
                    synchronized (this.thread) {
                        this.thread.notifyAll();
                    }
                }
            } finally {
                this.thread = null;
            }
        }
    }
911288
synchronized void deactivate() {
        paused = false;
        if (activeTask != null) {
            activeTask.cancel();
            activeTask = null;
        }
        this.threadPool = null;
    }
464408
public void stop() {
        if (session == null) {
            return;
        }

        sync.lock();

        try {
            if (session == null) {
                return;
            }

            onBeforeStop();

            session s = session;
            session = null; // stop alerts loop and session methods

            // guarantee one more alert is post and detected
            s.post_session_stats();
            try {
                // 250 is to ensure that the sleep is bigger
                // than the wait in alerts loop
                Thread.sleep(ALERTS_LOOP_WAIT_MILLIS + 250);
            } catch (InterruptedException ignore) {
            }

            if (alertsLoop != null) {
                try {
                    alertsLoop.join();
                } catch (Throwable e) {
                    // ignore
                }
            }

            resetState();

            s.delete();

            onAfterStop();

        } finally {
            sync.unlock();
        }
    }
915341
public synchronized void stop() {
        if (mConnectThread != null) {
            mConnectThread.cancel();
            mConnectThread = null;
        }

        if (mConnectedThread != null) {
            mConnectedThread.cancel();
            mConnectedThread = null;
        }

        if (mSecureAcceptThread != null) {
            mSecureAcceptThread.cancel();
            mSecureAcceptThread.kill();
            mSecureAcceptThread = null;
        }
        setState(BluetoothService.STATE_NONE);
    }
331310
@Override
    public final void close() {
        final CompletableFuture<Void> f;
        synchronized (this) {
            if (state == State.STOPPED) {
                return;
            }
            f = stop(null);
        }

        boolean interrupted = false;
        for (;;) {
            try {
                f.get();
                break;
            } catch (InterruptedException ignored) {
                interrupted = true;
            } catch (ExecutionException e) {
                closeFailed(Exceptions.peel(e));
                break;
            }
        }

        if (interrupted) {
            Thread.currentThread().interrupt();
        }
    }
258346
def halt(self):
        
        if self._callback:
            self._thread_continue = False
            self._thread.join()
343713
public boolean stop() {
        if (mThread != null) {
            mThread.interrupt();
            if (mThreadPool != null) {

                try {
                    mThreadPool.shutdownNow();
                } catch (SecurityException e) {
                    Log.w(LOG_TAG, "Could not stop all view server threads");
                }
            }

            mThreadPool = null;
            mThread = null;

            try {
                mServer.close();
                mServer = null;
                return true;
            } catch (IOException e) {
                Log.w(LOG_TAG, "Could not close the view server");
            }
        }

        mWindowsLock.writeLock().lock();
        try {
            mWindows.clear();
        } finally {
            mWindowsLock.writeLock().unlock();
        }

        mFocusLock.writeLock().lock();
        try {
            mFocusedWindow = null;
        } finally {
            mFocusLock.writeLock().unlock();
        }

        return false;
    }