Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Associates an execution context with a thread proxy, if it is not already associated with one.
virtual void BindContext(
IExecutionContext * pContext
) =0;
Parameters
- pContext
An interface to the execution context to associate with a thread proxy.
Remarks
Normally, the IThreadProxy::SwitchTo method will bind a thread proxy to an execution context on demand. There are, however, circumstances where it is necessary to bind a context in advance to ensure that the SwitchTo method switches to an already bound context. This is the case on a UMS scheduling context as it cannot call methods that allocate memory, and binding a thread proxy may involve memory allocation if a thread proxy is not readily available in the free pool of the thread proxy factory.
invalid_argument is thrown if the parameter pContext has the value NULL.
Requirements
Header: concrtrm.h
Namespace: Concurrency