Stop a the optimistic GC thread
351197
def gc_stop():
    
    global gc_thread
    
    if gc_thread:
        log.info("Shutting down GC thread")
        gc_thread.signal_stop()
        gc_thread.join()
        log.info("GC thread joined")
        gc_thread = None
    else:
        log.info("GC thread already joined")
1163889
def stop(self):
        """"""
        with self._operational_lock:
            self._bidi_rpc.close()

            if self._thread is not None:
                # Resume the thread to wake it up in case it is sleeping.
                self.resume()
                self._thread.join()

            self._thread = None
1369047
def stop(self):
        
        for run_event in self.run_events:
            run_event.clear()

        for thread in self.thread_pool:
            thread.join()
1282916
@Override
    public void stopThread(StoppableThreadCache cache) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "stopThread");

        this.hasToStop = true;

        //Remove this thread from the thread cache
        cache.deregisterThread(this);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "stopThread");
    }
279151
private void stopBackgroundThread() {
		mBackgroundThread.quitSafely();
		try {
			mBackgroundThread.join();
			mBackgroundThread = null;
			mBackgroundHandler = null;
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
1108601
def stop_listener_thread(self):
        
        if self.sync_thread:
            self.should_listen = False
            self.sync_thread.join()
            self.sync_thread = None
802840
def stop(self):
        
        with self.child_lock:
            children = copy(self.children)
        for c in children:
            DEBUG and c.name and Log.note("Stopping thread {{name|quote}}", name=c.name)
            c.stop()
        self.please_stop.go()

        DEBUG and Log.note("Thread {{name|quote}} got request to stop", name=self.name)
148707
private void endWaitingForUsage() {
        synchronized (permanentUserReadWriteLock) {
            if (permissionWithoutUsageLimit != null)
                permissionWithoutUsageLimit = null;
            if (permissionWithoutUsageCloseThread != null) {
                permissionWithoutUsageCloseThread.cancel(true);
                permissionWithoutUsageLimit = null;
            }
        }
    }
1170752
def stop(self, exc=None, exit_code=None):
        '''
        '''
        return self._concurrency.stop(self, exc, exit_code)
1162250
public void stop(boolean completeClear) {
        stopping = true;
        this.htod.invalidationBuffer.setStopping(true);
        htod.stop(completeClear);
        if (this.garbageCollectionThread != null) { // 313370
            synchronized (this.garbageCollectionThread.gcMonitor) {
                if (garbageCollectionThread.currentThread != null) {
                    garbageCollectionThread.currentThread.cancel(false);
                }
            }
        }
        if (this.diskCleanupThread != null) {
            synchronized (this.diskCleanupThread.dcMonitor) {
                this.diskCleanupThread.stopped = true;
                this.diskCleanupThread.processDiskCleanup = true;
                if (diskCleanupThread.currentThread != null) {
                    diskCleanupThread.currentThread.cancel(false);
                }
            }
        }
    }
420542
def _StopStatusUpdateThread(self):
    """"""
    self._status_update_active = False
    if self._status_update_thread.isAlive():
      self._status_update_thread.join()
    self._status_update_thread = None
794627
void gc() {
        if (stopped) {
            return;
        }
        long expirationTime = System.currentTimeMillis() - timeout;
        for (Iterator<Map.Entry<InputStreamKey, TimedStreamEntry>> iter = streamMap.entrySet().iterator(); iter.hasNext();) {
            if (stopped) {
                return;
            }
            Map.Entry<InputStreamKey, TimedStreamEntry> entry = iter.next();
            TimedStreamEntry timedStreamEntry = entry.getValue();
            if (timedStreamEntry.timestamp.get() <= expirationTime) {
                iter.remove();
                InputStreamKey key = entry.getKey();
                //noinspection SynchronizationOnLocalVariableOrMethodParameter
                synchronized (timedStreamEntry) { // ensure there's no race with a request that got a ref before we removed it
                    closeStreamEntry(timedStreamEntry, key.requestId, key.index);
                }
            }
        }
    }
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')
105332
public void stopThreads()
    {
        if (threadMap.isEmpty())
        {
            throw new IllegalStateException("threads are already interrupted");
        }
        lock.lock();
        try
        {
            Thread currentThread = Thread.currentThread();
            for (Thread thread : threadMap.values())
            {
                if (!currentThread.equals(thread))
                {
                    thread.interrupt();
                }
            }
            threadMap.clear();
            semaphoreMap.clear();
        }
        finally
        {
            lock.unlock();
        }
    }
427531
public void assertGLThread() {
        if (Thread.currentThread().getId() != mGLThreadID) {
            RuntimeException e = new RuntimeException(
                    "Should not run GL functions from a non-GL thread!");
            e.printStackTrace();
            throw e;
        }
    }
403912
public synchronized void stop() {
        if (!monitorActive) {
            return;
        }
        monitorActive = false;
        resetAccounting(milliSecondFromNano());
        if (trafficShapingHandler != null) {
            trafficShapingHandler.doAccounting(this);
        }
        if (scheduledFuture != null) {
            scheduledFuture.cancel(true);
        }
    }
1311457
void stopReload() throws InterruptedException {
    if (reloadThread != null) {
      running = false;
      reloadThread.interrupt();
      reloadThread.join();
      reloadThread = null;
    }
  }