IExecutionContext Structure

An interface to an execution context which can run on a given virtual processor and be cooperatively context switched.

struct IExecutionContext;


Public Methods



IExecutionContext::Dispatch Method

The method that is called when a thread proxy starts executing a particular execution context. This should be the main worker routine for your scheduler.

IExecutionContext::GetId Method

Returns a unique identifier for the execution context.

IExecutionContext::GetProxy Method

Returns an interface to the thread proxy that is executing this context.

IExecutionContext::GetScheduler Method

Returns an interface to the scheduler this execution context belongs to.

IExecutionContext::SetProxy Method

Associates a thread proxy with this execution context. The associated thread proxy invokes this method right before it starts executing the context's Dispatch method.


If you are implementing a custom scheduler that interfaces with the Concurrency Runtime's Resource Manager, you will need to implement the IExecutionContext interface. The threads created by the Resource Manager perform work on behalf of your scheduler by executing the IExecutionContext::Dispatch method.

Inheritance Hierarchy



Header: concrtrm.h

Namespace: concurrency

See Also


concurrency Namespace

IScheduler Structure

IThreadProxy Structure