/*
@see com.ibm.wsspi.channelfw.Channel#stop(long)
326353
public void stop(long millisec) {
        // PK12235, more specific states
        if (0 == millisec) {
            // immediate hard stop
            setState(STATE_STOPPED);
        } else {
            setState(STATE_STOPPING);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Stop: " + this);
        }
    }
208816
@Override
	public void stop() {
		if (state.stop()){
			try{
				doStop();
				state.finishStopping();
			}catch(Exception e){
				state.failStopping();
				logger.warn("Failed to stop {}", this.getClass().getName(), e);
			}
		}

	}
1125104
public void stop ()
    {
        if (_state == AL10.AL_STOPPED) {
            log.warning("Tried to stop stream that was already stopped.");
            return;
        }
        _source.stop();
        _state = AL10.AL_STOPPED;
    }
317049
@Override
    public void stop(long millisec) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "stop (" + millisec + ") " + getExternalName());
        }
        // Stop accepting new connections on the inbound channels
        if (!this.preparingToStop && acceptReqProcessor.get() != null && this.config.isInbound()) {
            acceptReqProcessor.get().removePort(this.endPoint);
            // PK60924 - stop the listening port now
            this.endPoint.destroyServerSocket();
            Tr.info(tc, TCPChannelMessageConstants.TCP_CHANNEL_STOPPED, getExternalName(), this.displayableHostName, String.valueOf(this.endPoint.getListenPort()));
            this.preparingToStop = true;
            // d247139 don't null acceptReqProcessor here,
            // need it for processing a subsequent "start"
        }

        // only stop the channel if millisec is 0, otherwise ignore.
        if (millisec == 0) {
            this.preparingToStop = false;
            this.stopFlag = true; // don't allow any further processing
            // destroy all the "in use" TCPConnLinks. This should close all
            // the sockets held by these connections.
            destroyConnLinks();
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "stop");
        }
    }
1278971
public void stopListenting() {
        if (channel != null) {
            log.info("closing server channel");
            channel.close().syncUninterruptibly();
            channel = null;
        }
    }
589264
@Override
   public void stop() {
      if (isStarted()) {
         log.debugf("Stopping remote cache manager %x", System.identityHashCode(this));
         synchronized (cacheName2RemoteCache) {
            for(Map.Entry<RemoteCacheKey, RemoteCacheHolder> cache : cacheName2RemoteCache.entrySet()) {
               cache.getValue().remoteCache().stop();
            }
            cacheName2RemoteCache.clear();
         }
         listenerNotifier.stop();
         counterManager.stop();
         channelFactory.destroy();
      }
      unregisterMBean();
      started = false;
   }
676451
public synchronized void stop() {
        if (isRunning()) {
            running.set(false);
            DeviceFinder.getInstance().removeDeviceAnnouncementListener(announcementListener);
            dbServerPorts.clear();
            for (Client client : openClients.values()) {
                try {
                    client.close();
                } catch (Exception e) {
                    logger.warn("Problem closing " + client + " when stopping", e);
                }
            }
            openClients.clear();
            useCounts.clear();
            deliverLifecycleAnnouncement(logger, false);
        }
    }
958443
public synchronized void stop() {
        if (state != State.STOPPED) {
            nanoTimeStop = System.nanoTime();
            state = State.STOPPED;
        }
    }
481033
public long stop() {
	if (isRunning) {
	    long time = _time() - start;
	    total += time;
	    count++;
	    isRunning = false;
	    return time;

	}
	return 0;
    }
1130841
def stop(cls):
        """"""
        if any(cls.streams):
            sys.stdout = cls.streams.pop(-1)
        else:
            sys.stdout = sys.__stdout__
437055
public boolean cancel(final boolean mayInterruptIfRunning, final long timeout, final TimeUnit unit)
      throws TimeoutException {
    return cancel(mayInterruptIfRunning, Optional.of(timeout), Optional.of(unit));
  }
1220805
@Override
    public synchronized void stop() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Stopping the basic FFDC service");
        }
        logSummary(true);
    }
104061
public void stop() {
        if (!started) return;
        synchronized (this) {
            try {
                started = false;
                if (processor != null) {
                    processor.stop();
                    processor = null;

                    for (RTPManager rtpMgr : rtpMgrs) {
                        rtpMgr.removeReceiveStreamListener(audioReceiver);
                        rtpMgr.removeSessionListener(audioReceiver);
                        rtpMgr.removeTargets("Session ended.");
                        rtpMgr.dispose();
                    }

                    sendStreams.clear();

                }
            }
            catch (Exception e) {
                LOGGER.log(Level.WARNING, "exception", e);
            }
        }
    }
1249975
@Override
	public void stopped() {

		// Clear endpoints
		writeLock.lock();
		try {
			listeners.clear();
		} finally {

			// Clear caches
			emitterCache.clear();
			broadcasterCache.clear();
			localBroadcasterCache.clear();

			writeLock.unlock();
		}
	}
417387
public void stop() {
        if (output) {
            System.setOut((PrintStream) out);
        } else {
            System.setErr((PrintStream) out);
        }
    }
646015
protected final void terminate() {
		if (rebind(connection)) {
			if (log.isTraceEnabled()) {
				log.trace(format(channel(), "Disposing ChannelOperation from a channel"),
						new Exception("ChannelOperation terminal stack"));
			}

			Operators.terminate(OUTBOUND_CLOSE, this);
			// Do not call directly inbound.onInboundComplete()
			// HttpClientOperations need to notify with error
			// when there is no response state
			onInboundComplete();
			if (channel().isActive() && isPersistent()) {
				channel().writeAndFlush(TERMINATED_OPS, this);
			}
			else {
				// Returned value is deliberately ignored
				setSuccess(null);
			}
		}
	}
22679
@Override
    public void stop() {
        super.stop();
        try {
            getContext().unregisterReceiver(mBroadcastReceiver);
        } catch(IllegalArgumentException e) {
            Log.d(TAG, "Unable to unregister receiver when stopping, probably not registered");
        }
    }