// Pause pauses playback if pause is true; resumes playback otherwise.
320664
func (cl *CommandList) Pause(pause bool) {
	if pause {
		cl.cmdQ.PushBack(&command{"pause 1", nil, cmdNoReturn})
	} else {
		cl.cmdQ.PushBack(&command{"pause 0", nil, cmdNoReturn})
	}
}
1269361
func (d *DRV2605LDriver) Halt() (err error) {
	if d.connection != nil {
		// stop playback
		if err = d.connection.WriteByteData(drv2605RegGo, 0); err != nil {
			return err
		}

		// enter standby
		return d.SetStandbyMode(true)
	}
	return
}
1080322
func (h *Haptic) Pause() error {
	return errorFromInt(int(
		C.SDL_HapticPause(h.cptr())))
}
528912
func (l *linuxProcessor) Pause(ctx context.Context, eventInfo *common.EventInfo) error {

	puID, err := l.generateContextID(eventInfo)
	if err != nil {
		return fmt.Errorf("unable to generate context id: %s", err)
	}

	return l.config.Policy.HandlePUEvent(ctx, puID, common.EventPause, nil)
}
1285956
func (sm *SyncManager) Pause() chan<- struct{} {
	c := make(chan struct{})
	sm.msgChan <- pauseMsg{c}
	return c
}
895938
func Resume(channel int) {
	_channel := (C.int)(channel)
	C.Mix_Resume(_channel)
}
866502
func (s *Server) Stop() {
	s.stopOnce.Do(func() {
		s.stopped = true
		s.listener.Close()
		close(s.startCh)
	})
}
39986
func (s *SlaveHealthChecker) Pause() {
	s.Lock()
	defer s.Unlock()
	s.paused = true
}
251970
func (p *Probe) Stop() {
	p.Lock()
	p.inprogress = stop
	p.Unlock()
}
888348
func (bo *Backoff) Pause() time.Duration {
	if bo.Initial == 0 {
		bo.Initial = time.Second
	}
	if bo.cur == 0 {
		bo.cur = bo.Initial
	}
	if bo.Max == 0 {
		bo.Max = 30 * time.Second
	}
	if bo.Multiplier < 1 {
		bo.Multiplier = 2
	}
	// Select a duration between 1ns and the current max. It might seem
	// counterintuitive to have so much jitter, but
	// https://www.awsarchitectureblog.com/2015/03/backoff.html argues that
	// that is the best strategy.
	d := time.Duration(1 + rand.Int63n(int64(bo.cur)))
	bo.cur = time.Duration(float64(bo.cur) * bo.Multiplier)
	if bo.cur > bo.Max {
		bo.cur = bo.Max
	}
	return d
}
52480
func (m *Monitor) Stop() {
	if m.stoppable != nil {
		m.stoppable.Stop()
		<-m.stoppable.Stopped
		m.stoppable = nil
	}
}
276516
func (pw *ProxyWatcher) Stopping() bool {
	pw.mutex.Lock()
	defer pw.mutex.Unlock()
	return pw.stopped
}
592819
func (s *Service) Pause(ctx context.Context) error {
	return s.collectContainersAndDo(ctx, func(c *container.Container) error {
		return c.Pause(ctx)
	})
}
1308331
func (c *cacheWatcher) stop() {
	c.Lock()
	defer c.Unlock()
	if !c.stopped {
		c.stopped = true
		close(c.done)
		close(c.input)
	}
}
946890
func (t *FixedInterval) Stop() bool {
	t.Lock()
	defer t.Unlock()

	if !t.running() {
		return false
	}

	// Stop the timer and set it to nil
	stopped := t.timer.Stop()
	t.timer = nil
	return stopped
}
589286
func pausePipelineCommand() *cli.Command {
	return &cli.Command{
		Name:     PausePipelineCommandName,
		Usage:    PausePipelineCommandUsage,
		Category: "Pipelines",
		Flags: []cli.Flag{
			cli.StringFlag{Name: "name"},
		},
		Action: ActionWrapper(pausePipelineAction),
	}
}
858405
func (w *mockWatcher) Stop() {
	select {
	case <-w.stop:
		return
	default:
		close(w.stop)
		close(w.results)
	}
}