// Stop logs stop of the trace
543228
func (t *Tracer) Stop() *Tracer {
	log.Debugf("Tracer completed %v in %v.", t.Description, time.Now().Sub(t.Started))
	return t
}
472539
func (p *SlowLogParser) Stop() {
	if p.opt.Debug {
		l.Println("stopping")
	}
	p.stopChan <- true
	return
}
866502
func (s *Server) Stop() {
	s.stopOnce.Do(func() {
		s.stopped = true
		s.listener.Close()
		close(s.startCh)
	})
}
98659
func (p *PubSubPush) Stop() {
	p.cancel()
	p.server.Shutdown(p.ctx)
	p.wg.Wait()
}
1366101
func Stop() {
	// Wait for on-going traces.
	globals.wg.Wait()
	globals.lockWriter.Lock()
	defer globals.lockWriter.Unlock()
	globals.lockContexts.Lock()
	defer globals.lockContexts.Unlock()
	if globals.out != nil {
		// TODO(maruel): Dump all the stack frames.
		_, _ = globals.out.Write(footerEvents)
	}
	globals.lockID.Lock()
	defer globals.lockID.Unlock()
	globals.out = nil
	globals.contexts = nil
	globals.nextPID = 0
	globals.nextID = 0

	// Lower back clock frequency once we're done.
	lowerClockFrequency()
}
709136
func Stop() {
	tch.Stop()
	yarpc.Stop()
	http.Stop()
	apachethrift.Stop()
	oneway.Stop()
	googlegrpc.Stop()
}
890201
func (l *logdogServer) Stop() error {
	if l.serv == nil {
		return fmt.Errorf("not started")
	}

	l.butler.Activate()
	if err := l.butler.Wait(); err != nil {
		return err
	}

	l.output.Close()

	l.serv = nil
	l.output = nil
	l.butler = nil
	return nil
}
39629
func (whisper *Whisper) Stop() error {
	close(whisper.quit)
	log.Info("whisper stopped")
	return nil
}
393896
func (rl *MemoryReplayLog) Stop() error {
	if rl.entries == nil || rl.batches == nil {
		return errReplayLogNotStarted
	}

	rl.batches = nil
	rl.entries = nil
	return nil
}
1261838
func (mr *MockNotifyWatcherMockRecorder) Stop() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Stop", reflect.TypeOf((*MockNotifyWatcher)(nil).Stop))
}
828345
func (s *GrpcServer) Stop() {
	s.lock.Lock()
	defer s.lock.Unlock()

	if !s.running {
		return
	}

	s.server.Stop()
	s.wg.Wait()
	s.running = false
}
1212737
func (s Service) Stop() error {
	running, err := s.Running()
	if err != nil {
		return errors.Trace(err)
	}
	if !running {
		return nil
	}

	args := []string{"stop", s.Name()}
	return s.execThenExpect(args, "Stopped.")
}
703998
func (em *EventMeter) Stop() {
	close(em.quit)

	if em.wsc.IsRunning() {
		em.wsc.Stop()
	}
}
470649
func (e *Environment) Stop() {
	e.mu.Lock()

	if !e.stopped {
		e.stopped = true
		close(e.stopCh)
	}

	e.mu.Unlock()
}
719844
func (b *batchProducer) Stop() error {
	b.runningMu.Lock()
	defer b.runningMu.Unlock()

	if !b.running {
		return ErrAlreadyStopped
	}

	// request the main goroutine to stop
	b.stop <- true

	// block until the main goroutine returns a value indicating that it has stopped
	<-b.stop

	b.running = false

	return nil
}
936936
func (c *chainWatcher) Stop() error {
	if !atomic.CompareAndSwapInt32(&c.stopped, 0, 1) {
		return nil
	}

	close(c.quit)

	c.wg.Wait()

	return nil
}
803490
func (s *Simulator) Stop() {
	_ = s.conn.Close()
	s.wg.Wait()
}