Represents an abstraction for a Concurrency Runtime scheduler.
Attaches the scheduler to the calling context. After this method returns, the calling context is managed by the scheduler and the scheduler becomes the current scheduler.
Creates a new scheduler whose behavior is described by the _Policy parameter, places an initial reference on the scheduler, and returns a pointer to it.
Creates a new schedule group within the scheduler.
Returns the current number of virtual processors for the scheduler.
Returns a copy of the policy that the scheduler was created with.
Returns a unique identifier for the scheduler.
Increments the scheduler's reference count.
Causes the Windows event handle passed in the _Event parameter to be signaled when the scheduler shuts down and destroys itself. At the time the event is signaled, all work that had been scheduled to the scheduler is complete. Multiple shutdown events may be registered through this method.
Decrements this scheduler's reference count.
Resets the default scheduler policy to the runtime's default. The next time a default scheduler is created, it will use the runtime's default policy settings.
Schedules a light-weight task within the scheduler. The light-weight task will be placed in a schedule group of the runtime's choosing.
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.
The Concurrency Runtime scheduler uses execution contexts, which map to the operating system's execution contexts, such as a thread or a UMS thread, to execute the work queued to it by your application. At any time, the concurrency level of a scheduler is equal to the number of virtual processor granted to it by the Resource Manager. A virtual processor is an abstraction for a processing resource and maps to a hardware thread on the underlying system. Only a single scheduler context may execute on a virtual processor at a given time.
The Concurrency Runtime will create a default scheduler per process to execute parallel work. In addition you may create your own scheduler instances and manipulate it using this class.