SchedulerPolicy 클래스SchedulerPolicy Class
SchedulerPolicy
클래스에는 정책 요소마다 하나씩, 스케줄러 인스턴스의 동작을 제어하는 키/값 쌍 집합을 포함합니다.The SchedulerPolicy
class contains a set of key/value pairs, one for each policy element, that control the behavior of a scheduler instance.
구문Syntax
class SchedulerPolicy;
멤버Members
Public 생성자Public Constructors
이름Name | 설명Description |
---|---|
SchedulerPolicySchedulerPolicy | 오버로드됨.Overloaded. 새 스케줄러 정책을 생성 하 고 동시성 런타임 스케줄러 및 리소스 관리자에서 지 원하는 정책 키 에 대 한 값으로 채웁니다.Constructs a new scheduler policy and populates it with values for policy keys supported by Concurrency Runtime schedulers and the Resource Manager. |
~ SchedulerPolicy 소멸자~SchedulerPolicy Destructor | 스케줄러 정책을 소멸 시킵니다.Destroys a scheduler policy. |
Public 메서드Public Methods
이름Name | 설명Description |
---|---|
GetPolicyValueGetPolicyValue | 매개 변수로 제공 된 정책 키의 값을 검색 합니다 key .Retrieves the value of the policy key supplied as the key parameter. |
SetConcurrencyLimitsSetConcurrencyLimits | MinConcurrency 개체에 대 한 및 정책을 동시에 설정 합니다 MaxConcurrency SchedulerPolicy .Simultaneously sets the MinConcurrency and MaxConcurrency policies on the SchedulerPolicy object. |
SetPolicyValueSetPolicyValue | 매개 변수로 제공 된 정책 키의 값을 설정 key 하 고 이전 값을 반환 합니다.Sets the value of the policy key supplied as the key parameter and returns the old value. |
Public 연산자Public Operators
NameName | 설명Description |
---|---|
연산자 =operator= | 다른 스케줄러 정책의 스케줄러 정책을 할당 합니다.Assigns the scheduler policy from another scheduler policy. |
설명Remarks
클래스를 사용 하 여 제어할 수 있는 정책에 대 한 자세한 내용은 SchedulerPolicy
Policyelementkey를 참조 하세요.For more information about the policies which can be controlled using the SchedulerPolicy
class, see PolicyElementKey.
상속 계층 구조Inheritance Hierarchy
SchedulerPolicy
요구 사항Requirements
헤더: concrt .h, concrtrm. hHeader: concrt.h, concrtrm.h
네임 스페이스: 동시성Namespace: concurrency
GetPolicyValueGetPolicyValue
매개 변수로 제공 된 정책 키의 값을 검색 합니다 key
.Retrieves the value of the policy key supplied as the key
parameter.
unsigned int GetPolicyValue(PolicyElementKey key) const;
매개 변수Parameters
keykey
값을 검색할 정책 키입니다.The policy key to retrieve a value for.
반환 값Return Value
매개 변수로 지정 된 키 key
가 지원 되 면 키에 대 한 정책 값이로 캐스팅 unsigned int
됩니다.If the key specified by the key
parameter is supported, the policy value for the key cast to an unsigned int
.
설명Remarks
이 메서드는 잘못 된 정책 키에 대 한 invalid_scheduler_policy_key 를 throw 합니다.The method will throw invalid_scheduler_policy_key for an invalid policy key.
연산자 =operator=
다른 스케줄러 정책의 스케줄러 정책을 할당 합니다.Assigns the scheduler policy from another scheduler policy.
SchedulerPolicy& operator= (const SchedulerPolicy& _RhsPolicy);
매개 변수Parameters
_RhsPolicy_RhsPolicy
이 정책에 할당할 정책입니다.The policy to assign to this policy.
반환 값Return Value
스케줄러 정책에 대 한 참조입니다.A reference to the scheduler policy.
설명Remarks
대부분의 경우 새로운 스케줄러 정책을 정의하는 가장 편리한 방법은 기존 정책을 복사한 후 SetPolicyValue
또는 SetConcurrencyLimits
메서드를 사용하여 수정하는 것입니다.Often, the most convenient way to define a new scheduler policy is to copy an existing policy and modify it using the SetPolicyValue
or SetConcurrencyLimits
methods.
SchedulerPolicySchedulerPolicy
새 스케줄러 정책을 생성 하 고 동시성 런타임 스케줄러 및 리소스 관리자에서 지 원하는 정책 키 에 대 한 값으로 채웁니다.Constructs a new scheduler policy and populates it with values for policy keys supported by Concurrency Runtime schedulers and the Resource Manager.
SchedulerPolicy();
SchedulerPolicy(
size_t _PolicyKeyCount,
...);
SchedulerPolicy(
const SchedulerPolicy& _SrcPolicy);
매개 변수Parameters
_PolicyKeyCount_PolicyKeyCount
매개 변수 다음에 오는 키/값 쌍의 수입니다 _PolicyKeyCount
.The number of key/value pairs that follow the _PolicyKeyCount
parameter.
_SrcPolicy_SrcPolicy
복사할 원본 정책입니다.The source policy to copy.
설명Remarks
첫 번째 생성자는 모든 정책이 기본값으로 초기화 되는 새 스케줄러 정책을 만듭니다.The first constructor creates a new scheduler policy where all policies will be initialized to their default values.
두 번째 생성자는 초기화의 명명 된 매개 변수 스타일을 사용 하는 새 스케줄러 정책을 만듭니다.The second constructor creates a new scheduler policy that uses a named-parameter style of initialization. 매개 변수 다음에 오는 값 _PolicyKeyCount
은 키/값 쌍으로 제공 됩니다.Values after the _PolicyKeyCount
parameter are supplied as key/value pairs. 이 생성자에 지정 되지 않은 모든 정책 키의 기본값은입니다.Any policy key which is not specified in this constructor will have its default value. 이 생성자는 invalid_scheduler_policy_key, invalid_scheduler_policy_value 또는 invalid_scheduler_policy_thread_specification예외를 throw 할 수 있습니다.This constructor could throw the exceptions invalid_scheduler_policy_key, invalid_scheduler_policy_value or invalid_scheduler_policy_thread_specification.
세 번째 생성자는 복사 생성자입니다.The third constructor is a copy constructor. 대부분의 경우 새로운 스케줄러 정책을 정의하는 가장 편리한 방법은 기존 정책을 복사한 후 SetPolicyValue
또는 SetConcurrencyLimits
메서드를 사용하여 수정하는 것입니다.Often, the most convenient way to define a new scheduler policy is to copy an existing policy and modify it using the SetPolicyValue
or SetConcurrencyLimits
methods.
~ SchedulerPolicy~SchedulerPolicy
스케줄러 정책을 소멸 시킵니다.Destroys a scheduler policy.
~SchedulerPolicy();
SetConcurrencyLimitsSetConcurrencyLimits
MinConcurrency
개체에 대 한 및 정책을 동시에 설정 합니다 MaxConcurrency
SchedulerPolicy
.Simultaneously sets the MinConcurrency
and MaxConcurrency
policies on the SchedulerPolicy
object.
void SetConcurrencyLimits(
unsigned int _MinConcurrency,
unsigned int _MaxConcurrency = MaxExecutionResources);
매개 변수Parameters
_MinConcurrency_MinConcurrency
정책 키에 대 한 값 MinConcurrency
입니다.The value for the MinConcurrency
policy key.
_MaxConcurrency_MaxConcurrency
정책 키에 대 한 값 MaxConcurrency
입니다.The value for the MaxConcurrency
policy key.
설명Remarks
정책에 지정 된 값이 정책에 지정 된 값 보다 크면 메서드는 invalid_scheduler_policy_thread_specification 을 throw 합니다 MinConcurrency
MaxConcurrency
.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.
메서드는 다른 잘못 된 값에 대해 invalid_scheduler_policy_value 을 throw 할 수도 있습니다.The method can also throw invalid_scheduler_policy_value for other invalid values.
SetPolicyValueSetPolicyValue
매개 변수로 제공 된 정책 키의 값을 설정 key
하 고 이전 값을 반환 합니다.Sets the value of the policy key supplied as the key
parameter and returns the old value.
unsigned int SetPolicyValue(
PolicyElementKey key,
unsigned int value);
매개 변수Parameters
keykey
값을 설정할 정책 키입니다.The policy key to set a value for.
valuevalue
정책 키를 설정할 값입니다.The value to set the policy key to.
반환 값Return Value
매개 변수로 지정 된 키 key
가 지원 되는 경우 키에 대 한 이전 정책 값은로 캐스팅 unsigned int
됩니다.If the key specified by the key
parameter is supported, the old policy value for the key cast to an unsigned int
.
설명Remarks
메서드는 값이 메서드에 의해 설정 될 수 없는 잘못 된 정책 키 또는 정책 키에 대 한 invalid_scheduler_policy_key 를 throw 합니다 SetPolicyValue
.The method will throw invalid_scheduler_policy_key for an invalid policy key or any policy key whose value cannot be set by the SetPolicyValue
method.
메서드는 매개 변수로 지정 된 키에 지원 되지 않는 값에 대 한 invalid_scheduler_policy_value 를 throw key
합니다.The method will throw invalid_scheduler_policy_value for a value that is not supported for the key specified by the key
parameter.
이 메서드는 또는 정책을 설정할 수 없습니다 MinConcurrency
MaxConcurrency
.Note that this method is not allowed to set the MinConcurrency
or MaxConcurrency
policies. 이러한 값을 설정 하려면 SetConcurrencyLimits 메서드를 사용 합니다.To set these values, use the SetConcurrencyLimits method.
참고 항목See also
concurrency 네임 스페이스concurrency Namespace
PolicyElementKeyPolicyElementKey
CurrentScheduler 클래스CurrentScheduler Class
Scheduler 클래스Scheduler Class
작업 SchedulerTask Scheduler