// PausedPrompt is called when the we can't update cause the app is in use.
// We return true if the use wants to cancel the update.
962017
func (c context) PausedPrompt() bool {
	promptProgram, err := c.config.promptProgram()
	if err != nil {
		c.log.Warningf("Error trying to get prompt path: %s", err)
		return false
	}
	cancelUpdate, err := c.pausedPrompt(promptProgram, 5*time.Minute)
	if err != nil {
		c.log.Warningf("Error in paused prompt: %s", err)
		return false
	}
	return cancelUpdate
}
1157463
func (p *AuroraSchedulerManagerClient) PauseJobUpdate(ctx context.Context, key *JobUpdateKey, message string) (r *Response, err error) {
  var _args149 AuroraSchedulerManagerPauseJobUpdateArgs
  _args149.Key = key
  _args149.Message = message
  var _result150 AuroraSchedulerManagerPauseJobUpdateResult
  if err = p.Client_().Call(ctx, "pauseJobUpdate", &_args149, &_result150); err != nil {
    return
  }
  return _result150.GetSuccess(), nil
}
580807
func (m *MockProvisionerClient) Stop(arg0 context.Context, arg1 *tfplugin5.Stop_Request, arg2 ...grpc.CallOption) (*tfplugin5.Stop_Response, error) {
	m.ctrl.T.Helper()
	varargs := []interface{}{arg0, arg1}
	for _, a := range arg2 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "Stop", varargs...)
	ret0, _ := ret[0].(*tfplugin5.Stop_Response)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
437329
func (a *EventCorrelator) AttemptsForCancellation(info *CancellationInfo) int {
	a.checkInit()
	if info == nil || info.WorkflowId == "" {
		return 0
	}
	return a.CancelationAttempts[info.WorkflowId]
}
697839
func (s *GetBotOutput) SetClarificationPrompt(v *Prompt) *GetBotOutput {
	s.ClarificationPrompt = v
	return s
}
260508
func (s *service) Pause(ctx context.Context, r *taskAPI.PauseRequest) (*ptypes.Empty, error) {
	return nil, errdefs.ErrNotImplemented
}
771404
func handlePrompt(r *Request) (interface{}, error) {
	fmt.Print(r.Args.One().MustString())
	var s string
	_, err := fmt.Scanln(&s)
	return s, err
}
109884
func promptInteractive(upgradedHostId, upgradedHostName string) (stopPrompting bool, err error) {
	stopPrompting = false
	scanner := bufio.NewScanner(os.Stdin)
	if upgradedHostName != "" {
		glog.Infof("Pausing after finished %q, node %q", upgradedHostId, upgradedHostName)
	} else {
		glog.Infof("Pausing after finished %q", upgradedHostId)
	}
	fmt.Print("Continue? (Y)es, (N)o, (A)lwaysYes: [Y] ")
	scanner.Scan()
	err = scanner.Err()
	if err != nil {
		glog.Infof("unable to interpret input: %v", err)
		return stopPrompting, err
	}
	val := scanner.Text()
	val = strings.TrimSpace(val)
	val = strings.ToLower(val)
	switch val {
	case "n":
		glog.Info("User signaled to stop")
		os.Exit(3)
	case "a":
		glog.Info("Always Yes, stop prompting for rest of hosts")
		stopPrompting = true
	}
	return stopPrompting, err
}
1007114
func (s *GetIntentOutput) SetConfirmationPrompt(v *Prompt) *GetIntentOutput {
	s.ConfirmationPrompt = v
	return s
}
39986
func (s *SlaveHealthChecker) Pause() {
	s.Lock()
	defer s.Unlock()
	s.paused = true
}
218973
func (u *uidProcessor) Pause(ctx context.Context, eventInfo *common.EventInfo) error {

	return u.config.Policy.HandlePUEvent(ctx, eventInfo.PUID, common.EventPause, nil)
}
1092003
func (t *Terminal) SetPrompt(prompt string) {
	t.lock.Lock()
	defer t.lock.Unlock()

	t.prompt = []rune(prompt)
}
269899
func (e *Endpoint) WaitForProxyCompletions(proxyWaitGroup *completion.WaitGroup) error {
	if proxyWaitGroup == nil {
		return nil
	}

	err := proxyWaitGroup.Context().Err()
	if err != nil {
		return fmt.Errorf("context cancelled before waiting for proxy updates: %s", err)
	}

	start := time.Now()

	e.getLogger().Debug("Waiting for proxy updates to complete...")
	err = proxyWaitGroup.Wait()
	if err != nil {
		return fmt.Errorf("proxy state changes failed: %s", err)
	}
	e.getLogger().Debug("Wait time for proxy updates: ", time.Since(start))

	return nil
}
291646
func (p *localPrevAlloc) IsWaiting() bool {
	p.waitingLock.RLock()
	b := p.waiting
	p.waitingLock.RUnlock()
	return b
}
552401
func (e *CElement) PrevWait() *CElement {
	for {
		e.mtx.RLock()
		prev := e.prev
		prevWg := e.prevWg
		removed := e.removed
		e.mtx.RUnlock()

		if prev != nil || removed {
			return prev
		}

		prevWg.Wait()
	}
}
789442
func (t *Task) Pause(ctx context.Context) error {
	if _, err := t.shim.Pause(ctx, empty); err != nil {
		return errdefs.FromGRPC(err)
	}
	t.events.Publish(ctx, runtime.TaskPausedEventTopic, &eventstypes.TaskPaused{
		ContainerID: t.id,
	})
	return nil
}
540933
func (l *ServiceListener) Pause(reqs []StateRequest) (int, bool) {
	delta := 0
	ok := true

	for _, req := range reqs {

		logger := plog.WithFields(log.Fields{
			"hostid":     req.HostID,
			"serviceid":  req.ServiceID,
			"instanceid": req.InstanceID,
		})

		// ONLY pause services with a desired state of run
		if err := UpdateState(l.conn, req, func(s *State) bool {
			if s.DesiredState == service.SVCRun {
				s.DesiredState = service.SVCPause
				return true
			}
			return false
		}); err != nil {

			logger.WithError(err).Warn("Could not pause service state")
			ok = false
			continue
		}
		delta++
	}

	return delta, ok
}