// Stop log monitoring
777669
func (d *dockerLogger) Stop() error {
	if d.cancelCtx != nil {
		d.cancelCtx()
	}

	d.stdLock.Lock()
	stdout, stderr := d.stdout, d.stderr
	d.stdLock.Unlock()

	if stdout != nil {
		stdout.Close()
	}
	if stderr != nil {
		stderr.Close()
	}
	return nil
}
399989
func (p *Provisioner) Stop() error {
	p.stopOnce.Do(p.stopInit)
	p.stopCtxCancel()
	return nil
}
703998
func (em *EventMeter) Stop() {
	close(em.quit)

	if em.wsc.IsRunning() {
		em.wsc.Stop()
	}
}
709136
func Stop() {
	tch.Stop()
	yarpc.Stop()
	http.Stop()
	apachethrift.Stop()
	oneway.Stop()
	googlegrpc.Stop()
}
349196
func (c *Discovery) Stop(ctx context.Context) {
	if c.downloader != nil {
		c.downloader.Stop(ctx)
	}
}
1172447
func (d *DecayedLog) Stop() error {
	if !atomic.CompareAndSwapInt32(&d.stopped, 0, 1) {
		return nil
	}

	// Stop garbage collector.
	close(d.quit)

	d.wg.Wait()

	// Close boltdb.
	d.db.Close()

	return nil
}
537655
func (c *ChannelNotifier) Stop() {
	if !atomic.CompareAndSwapUint32(&c.stopped, 0, 1) {
		return
	}

	c.ntfnServer.Stop()
}
251970
func (p *Probe) Stop() {
	p.Lock()
	p.inprogress = stop
	p.Unlock()
}
376506
func (w *userProjectWatcher) Stop() {
	// lock access so we don't race past the channel select
	w.stopLock.Lock()
	defer w.stopLock.Unlock()

	// Prevent double channel closes.
	select {
	case <-w.userStop:
		return
	default:
	}
	close(w.userStop)
}
244801
func (t *OplogTailer) Stop() error {
	t.tomb.Kill(nil)
	return t.tomb.Wait()
}
587098
func (s *GrblStreamer) Stop() {
	_, _ = s.serialPort.Write([]byte("\x18"))
	s.serialPort.Close()
}
979103
func (s *scheduler) Stop() {
	s.Lock()
	defer s.Unlock()

	if !s.started {
		return
	}
	close(s.shutdown)
	<-s.stopped
}
866502
func (s *Server) Stop() {
	s.stopOnce.Do(func() {
		s.stopped = true
		s.listener.Close()
		close(s.startCh)
	})
}
1068005
func Stop() {
	flag.Parse()

	var status string
	if KillPID(*DaemonPIDFile) {
		status = "Status: Stopped."
	} else {
		status = fmt.Sprintf("Failed to stop. Status: %s", StatusPID(*DaemonPIDFile))
	}

	LogDaemon(status)
}
652523
func (s *server) Stop() {
	if s.State() == Stopped {
		return
	}

	close(s.stopped)

	// make sure all goroutines have stopped before we close the log
	s.routineGroup.Wait()

	s.log.close()
	s.setState(Stopped)
}
169177
func (m *SubscriptionManager) Stop() {
	if atomic.AddInt32(&m.stopped, 1) != 1 {
		return
	}

	log.Debug("Stopping block notifications subscription manager")

	close(m.quit)
	m.wg.Wait()

	var wg sync.WaitGroup
	wg.Add(len(m.subscribers))
	for _, subscriber := range m.subscribers {
		go func() {
			defer wg.Done()
			subscriber.cancel()
		}()
	}

	wg.Wait()
}
951991
func (w *WSAcceptor) Stop() {
	err := w.listener.Close()
	if err != nil {
		logger.Log.Errorf("Failed to stop: %s", err.Error())
	}
}