Concurrency Namespace


Visual Studio 2010 - Visual C++
Scheduler Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Abstraction for a scheduler without TLS storage and which only manages internal contexts.

class Scheduler;
Members

Protected Constructors

Name

Description

Scheduler::~Scheduler Destructor

class Scheduler is only creatable through factory methods or implicitly.

Scheduler::Scheduler Constructor

class Scheduler is only creatable through factory methods or implicitly.

Public Methods

Name

Description

Scheduler::Attach Method

Attaches this scheduler to the calling thread. Implicitly calls Reference. After this function is called, the calling thread is then managed by the scheduler and the scheduler becomes the current scheduler. It is illegal for an internal context to call Attach on its current scheduler.

Scheduler::Create Method

Creates a scheduler that only manages internal contexts. Implicitly calls Reference. If Attach is called, the scheduler is no longer anonymous because it is also managing the external context where Attach was called. To destroy an anonymous scheduler, Release needs to be called.

Scheduler::CreateScheduleGroup Method

Create a schedule group within this scheduler.

Scheduler::GetNumberOfVirtualProcessors Method

Scheduler::GetPolicy Method

Scheduler::Id Method

Scheduler::Reference Method

Increments a reference count to this scheduler to manage lifetimes over composition. This reference count is known as the scheduler reference count.

Scheduler::RegisterShutdownEvent Method

Causes the OS event object 'event' to be set when the scheduler shuts down and destroys itself. Multiple shutdown events may be registered.

Scheduler::Release Method

Scheduler::ResetDefaultSchedulerPolicy Method

Resets the default scheduler policy, and the next time a default scheduler is created, it will use the runtime's default policy settings.

Scheduler::ScheduleTask Method

Schedules a light-weight task (cf. Task below) within this scheduler in an implementation dependent schedule group.

Scheduler::SetDefaultSchedulerPolicy Method

Allows a user defined policy to be used to create the default scheduler. It is only valid to call this API when no default scheduler exists. Once a default policy is set, it remains in effect until the next valid call to the API.

Inheritance Hierarchy

Concurrency::Scheduler

Requirements

Header: concrt.h

See Also

Reference

Page view tracker