SchedulerPolicy::SetConcurrencyLimits Method

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

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 can 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