task_continuation_context Class
The task_continuation_context class allows you to specify where you would like a continuation to be executed. You use this class only in a Windows Store app. For desktop apps, the task continuation's execution context is determined by the runtime, and isn’t configurable.
class task_continuation_context : public details::_ContextCallback;
Members
Public Methods
Name |
Description |
---|---|
Creates a task continuation context which allows the runtime to choose the execution context for a continuation. |
|
Returns a task continuation context object that represents the current execution context. |
|
Creates the default task continuation context. |
Remarks
A task that's created from an asynchronous operation, such as Windows::Foundation::IAsyncOperation<TResult>, uses special semantics that can help you ignore the threading details. Although an operation might run on a background thread (or it may not be backed by a thread at all), its continuations are by default guaranteed to run on the apartment that started the continuation operations (in other words, from the apartment that called concurrency::task::then). You can use the task_continuation_context class to control the execution context of a continuation. For more info, see Creating Asynchronous Operations in C++ for Windows Store Apps.
Inheritance Hierarchy
_ContextCallback
task_continuation_context
Requirements
Header: ppltasks.h
Namespace: concurrency