Aracılığıyla paylaş


Scheduler::SetDefaultSchedulerPolicy Method

Allows a user defined policy to be used to create the default scheduler. This method may only be called when no default scheduler exists within the process. Once a default policy has been set, it remains in effect until the next valid call to either the SetDefaultSchedulerPolicy or the ResetDefaultSchedulerPolicy method.

_CRTIMP static void __cdecl SetDefaultSchedulerPolicy(
   const SchedulerPolicy& _Policy
);

Parameters

  • _Policy
    The policy to be set as the default scheduler policy.

Remarks

If the SetDefaultSchedulerPolicy method is called when a default scheduler already exists within the process, the runtime will throw a default_scheduler_exists exception.

Requirements

Header: concrt.h

Namespace: Concurrency

See Also

Reference

Scheduler Class

Scheduler::ResetDefaultSchedulerPolicy Method

SchedulerPolicy Class

PolicyElementKey Enumeration

Concepts

Task Scheduler (Concurrency Runtime)