Scheduler::SetDefaultSchedulerPolicy Method

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

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)