Share via


SchedulerPolicy::SetConcurrencyLimits Method

Simultaneously sets the MinConcurrency and MaxConcurrency policies on the SchedulerPolicy object.

_CRTIMP void SetConcurrencyLimits(
   unsigned int _MinConcurrency,
   unsigned int _MaxConcurrency = MaxExecutionResources
);

Parameters

  • _MinConcurrency
    The value for the MinConcurrency policy key.

  • _MaxConcurrency
    The value for the MaxConcurrency policy key.

Remarks

The method will throw invalid_scheduler_policy_thread_specification if the value specified for the MinConcurrency policy is greater than that specified for the MaxConcurrency policy.

The method may also throw invalid_scheduler_policy_value for other invalid values.

Requirements

Header: concrt.h

Namespace: Concurrency

See Also

Reference

SchedulerPolicy Class

SchedulerPolicy::GetPolicyValue Method

SchedulerPolicy::SetPolicyValue Method

PolicyElementKey Enumeration