// OnActivityCanceled builds a composed decider that fires when a matching activity is canceled.
320698
func OnActivityCanceled(activityName string, deciders ...Decider) Decider {
	return OnActivityEvents(activityName, []string{
		swf.EventTypeActivityTaskCanceled,
	}, deciders...)
}
1089944
func (s *ServiceSoftwareOptions) SetCancellable(v bool) *ServiceSoftwareOptions {
	s.Cancellable = &v
	return s
}
187729
func (t *Template) GetAWSStepFunctionsActivityWithName(name string) (*resources.AWSStepFunctionsActivity, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSStepFunctionsActivity:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSStepFunctionsActivity not found", name)
}
555051
func (c *Ctx) WithCancel() (cf context.CancelFunc) {
	c.netContext, cf = context.WithCancel(c.netContext)
	return
}
1314927
func OnTimerCanceled(timer string, deciders ...Decider) Decider {
	return func(ctx *FSMContext, h *swf.HistoryEvent, data interface{}) Outcome {
		switch *h.EventType {
		case swf.EventTypeTimerCanceled:
			if *h.TimerCanceledEventAttributes.TimerId == timer {
				logf(ctx, "at=on-timer-canceled timer=%q", *h.TimerCanceledEventAttributes.TimerId)
				return NewComposedDecider(deciders...)(ctx, h, data)
			}
		}
		return ctx.Pass()
	}
}
477934
func IsCanceled(err error) bool {
	return isCausedBy(err, func(e error) bool { return e == context.Canceled })
}
898301
func (s *HistoryEvent) SetRequestCancelActivityTaskFailedEventAttributes(v *RequestCancelActivityTaskFailedEventAttributes) *HistoryEvent {
	s.RequestCancelActivityTaskFailedEventAttributes = v
	return s
}
117906
func WithCancel(d Doner) (C, func()) {
	var closer sync.Once
	cq := make(chan struct{})
	cancel := func() { closer.Do(func() { close(cq) }) }

	go func() {
		select {
		case <-cq:
		case <-d.Done():
			cancel()
		}
	}()

	return cq, cancel
}
1356594
func (cr *ConflictResolver) ForceCancel() {
	cr.inputLock.Lock()
	defer cr.inputLock.Unlock()
	if cr.currCancel != nil {
		cr.currCancel()
	}
}
532224
func (s *HistoryEvent) SetActivityTaskFailedEventAttributes(v *ActivityTaskFailedEventAttributes) *HistoryEvent {
	s.ActivityTaskFailedEventAttributes = v
	return s
}
212054
func IsCancelled(err error) bool {
	_, ok := getImplementer(err).(ErrCancelled)
	return ok
}
332142
func (s *RuleGroupUpdate) SetActivatedRule(v *ActivatedRule) *RuleGroupUpdate {
	s.ActivatedRule = v
	return s
}
605487
func WithActivityID(activityID *guid.GUID) EventOpt {
	return func(options *eventOptions) {
		options.activityID = activityID
	}
}
363605
func (c *Client) RequestCancelWorkflowExecution(request RequestCancelWorkflowExecution) error {
	err := c.swfReqNoResponse("RequestCancelWorkflowExecution", request)
	return err
}
276104
func (w *Worker) TaskCancel(taskId string) (err error) {
	_, err = w.tasks(taskId, "cancel").Request("POST", nil)
	return err
}
547590
func (s *ReportTaskProgressOutput) SetCanceled(v bool) *ReportTaskProgressOutput {
	s.Canceled = &v
	return s
}
404061
func (m *Machine) CancelAction(action Action) (Action, error) {
	return action.Finish(ActionResults{Status: ActionCancelled})
}