// StartLimited creates and runs a new scene with an inactivity
// and an absolute timeout. They may be zero.
777901
func StartLimited(inactivity, absolute time.Duration) Scene {
	s := &scene{
		id:          identifier.NewUUID(),
		props:       make(map[string]*box),
		flags:       make(map[string]bool),
		signalings:  make(map[string][]chan struct{}),
		inactivity:  inactivity,
		absolute:    absolute,
		commandChan: make(chan *envelope, 1),
	}
	s.backend = loop.Go(s.backendLoop, "scene", s.id.String())
	return s
}
1027606
func (s *DescribeMatchmakingConfigurationsInput) SetLimit(v int64) *DescribeMatchmakingConfigurationsInput {
	s.Limit = &v
	return s
}
750530
func ProcessLimited(limit int, processor func(dataPoint)) chan struct{} {
	// Fetch unreported window
	done := make(chan struct{})
	dropCount := 0
	if limit > 0 {
		count := len(cdata)
		if count > limit {
			// drop old samples to satisfy the limit
			dropCount = count - limit
		}
	}

	go func(dropCount, limit int, pending []dataPoint, done chan struct{}) {
	samples:
		for count := 0; limit == 0 || count < limit; {
			select {
			case sample := <-cdata:
				log.Debug("Stats.Processing=", sample)
				if dropCount > 0 {
					// skip old samples
					dropCount--
					break
				}
				processor(sample)
				count++
			default:
				break samples
			}
		}
		for _, sample := range pending {
			log.Debug("Stats.Processing pending=", sample)
			processor(sample)
		}
		close(done)
	}(dropCount, limit, getPendingOps(), done)

	return done
}
708605
func (s *ListTapesInput) SetLimit(v int64) *ListTapesInput {
	s.Limit = &v
	return s
}
917923
func (s *ListUsersInput) SetLimit(v int64) *ListUsersInput {
	s.Limit = &v
	return s
}
1173501
func (s *DescribeComplianceByResourceInput) SetLimit(v int64) *DescribeComplianceByResourceInput {
	s.Limit = &v
	return s
}
1223873
func (s *ListTagsForDeliveryStreamInput) SetLimit(v int64) *ListTagsForDeliveryStreamInput {
	s.Limit = &v
	return s
}
1326402
func (s *DescribeGameSessionsInput) SetLimit(v int64) *DescribeGameSessionsInput {
	s.Limit = &v
	return s
}
1132003
func (s *GetUsagePlansInput) SetLimit(v int64) *GetUsagePlansInput {
	s.Limit = &v
	return s
}
1046336
func (s *DescribeFleetAttributesInput) SetLimit(v int64) *DescribeFleetAttributesInput {
	s.Limit = &v
	return s
}
489797
func (s *GetClientCertificatesInput) SetLimit(v int64) *GetClientCertificatesInput {
	s.Limit = &v
	return s
}
11482
func (s *ListVirtualRoutersInput) SetLimit(v int64) *ListVirtualRoutersInput {
	s.Limit = &v
	return s
}
1176720
func (s *GetVpcLinksInput) SetLimit(v int64) *GetVpcLinksInput {
	s.Limit = &v
	return s
}
451765
func (s *ListResourceTagsInput) SetLimit(v int64) *ListResourceTagsInput {
	s.Limit = &v
	return s
}
188770
func (s *ListVolumesInput) SetLimit(v int64) *ListVolumesInput {
	s.Limit = &v
	return s
}
584081
func (s *ListKeyPoliciesInput) SetLimit(v int64) *ListKeyPoliciesInput {
	s.Limit = &v
	return s
}
1116650
func (s *GetApiKeysInput) SetLimit(v int64) *GetApiKeysInput {
	s.Limit = &v
	return s
}