Removes the location / route listeners and  quits the thread.
333070
void endNavigation() {
    NavigationTelemetry.getInstance().endSession();
    routeFetcher.clearListeners();
    locationUpdater.removeLocationUpdates();
    notificationProvider.shutdown(getApplication());
    thread.quit();
  }
1353188
protected void onRemoved() {
        List<FilterChangeListener> listeners = getAllListeners();
        for (FilterChangeListener listener : listeners) {
            listener.onRemove(this);
        }
    }
77545
function removeListener(listeners) {
		for (var i = listeners.length; --i >= 0;) {
			// There should only be ONE exhausted listener.
			if (!listeners[i].calls) {
				return listeners.splice(i, 1);
			}
		}
	}
394625
private synchronized void cleanupThread ( long timeout ) throws TransportException {
        Thread t = this.thread;
        if ( t != null && Thread.currentThread() != t ) {
            this.thread = null;
            try {
                log.debug("Interrupting transport thread");
                t.interrupt();
                log.debug("Joining transport thread");
                t.join(timeout);
                log.debug("Joined transport thread");
            }
            catch ( InterruptedException e ) {
                throw new TransportException("Failed to join transport thread", e);
            }
        }
        else if ( t != null ) {
            this.thread = null;
        }
    }
1329995
@SuppressWarnings("WeakerAccess")
    public synchronized void stop() {
        if (isRunning()) {
            BeatFinder.getInstance().removeBeatListener(beatListener);
            VirtualCdj.getInstance().removeUpdateListener(updateListener);
            running.set(false);
            positions.clear();
            updates.clear();
            deliverLifecycleAnnouncement(logger, false);
        }
    }
1210949
public synchronized void stop() {

        _coreMonitor.unregister();

        for (ServiceReg<FileMonitor> reg : _monitors.values()) {
            reg.unregister();
        }

        _monitors.clear();

        // Tidy up old location if we built it
        tidyUpMonitoredDirectory(createdMonitoredDir.get(), monitoredDirectory.get());
    }
709324
def remove_service_listener(self, listener):
        """"""
        for browser in self.browsers:
            if browser.listener == listener:
                browser.cancel()
                del(browser)
619264
def stop(self):
        
        self.debug("()")
        try:
            self.unjoin()
            time.sleep(2)
        except:
            self.exception("Failed to leave audience")
        super(SensorClient, self).stop()
1186012
@Override
    public void disconnect()
    {
        network.disconnect();
        for (final L listener : listeners)
        {
            network.removeListener(listener);
        }
        listeners.clear();
    }
822763
public void removeFromMoving(InetAddress endpoint)
    {
        assert endpoint != null;

        lock.writeLock().lock();
        try
        {
            for (Pair<Token, InetAddress> pair : movingEndpoints)
            {
                if (pair.right.equals(endpoint))
                {
                    movingEndpoints.remove(pair);
                    break;
                }
            }

            invalidateCachedRings();
        }
        finally
        {
            lock.writeLock().unlock();
        }
    }
1165734
public void removeListener(KeyMatcher matcher,
            VehicleMessage.Listener listener) {
        mNotifier.unregister(matcher, listener);
    }
1163767
public void clear() {
        int currentCount = threadCounter.decrementAndGet();
        if (log.isLoggable(Level.FINEST)) {
            log.finest("Clear: Disassociate Thread from FragmentBuilder(1): current thread count=" + currentCount);
            synchronized (threadNames) {
                threadNames.remove(Thread.currentThread().getName());
            }
        }
        FragmentBuilder currentBuilder = builders.get();
        if (currentBuilder != null) {
            currentBuilder.decrementThreadCount();
        }
        builders.remove();
    }
281606
public void stopStanzaAndPEPListeners() {
        PepManager.getInstanceFor(connection()).removePepListener(deviceListUpdateListener);
        connection().removeAsyncStanzaListener(internalOmemoMessageStanzaListener);
        CarbonManager.getInstanceFor(connection()).removeCarbonCopyReceivedListener(internalOmemoCarbonCopyListener);
    }
979586
public static void removeAll() {
        InternalThreadLocalMap threadLocalMap = InternalThreadLocalMap.getIfSet();
        if (threadLocalMap == null) {
            return;
        }

        try {
            Object v = threadLocalMap.indexedVariable(variablesToRemoveIndex);
            if (v != null && v != InternalThreadLocalMap.UNSET) {
                @SuppressWarnings("unchecked")
                Set<FastThreadLocal<?>> variablesToRemove = (Set<FastThreadLocal<?>>) v;
                FastThreadLocal<?>[] variablesToRemoveArray =
                        variablesToRemove.toArray(new FastThreadLocal[0]);
                for (FastThreadLocal<?> tlv: variablesToRemoveArray) {
                    tlv.remove(threadLocalMap);
                }
            }
        } finally {
            InternalThreadLocalMap.remove();
        }
    }
934388
protected void dispose() {
        final WebSocket currentWebSocket = webSocket;
        if (currentWebSocket != null && currentWebSocket.isOpen()) {
            try {
                currentWebSocket.disconnect(WebSocketCloseCode.AWAY.getCode());
            } catch (final Exception exception) {
                postErrorEvent(exception);
            }
        }
    }
1187329
public void remove() {
        Thread thread = Thread.currentThread();
        if (thread instanceof ThreadPool.Worker) {
            Object[] wsLocals = getThreadLocals((ThreadPool.Worker) thread);
            wsLocals[index] = null;
        } else {
            super.remove();
        }
    }
502236
@PreDestroy
    public void disconnectLocator() throws InterruptedException,
            ServiceLocatorException {
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Destroy Locator client");
        }

        if (endpointCollector != null) {
            endpointCollector.stopScheduledCollection();
        }
        
        if (locatorClient != null) {
            locatorClient.disconnect();
            locatorClient = null;
        }
    }