task_continuation_context::use_default Method

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic
Visual Studio 2012

Creates the default task continuation context.

static task_continuation_context use_default();

The default continuation context.

The default context is used if you don't specifiy a continuation context when you call the then method. In Windows applications for Windows 7 and below, as well as desktop applications on Windows 8 and higher, the runtime determines where task continuations will execute. However, in a Metro style app, the default continuation context for a continuation on an apartment aware task is the apartment where then is invoked.

An apartment aware task is a task that unwraps a Windows Runtime IAsyncInfo interface, or a task that is descended from such a task. Therefore, if you schedule a continuation on an apartment aware task in a Windows Runtime STA, the continuation will execute in that STA.

A continuation on a non-apartment aware task will execute in a context the Runtime chooses.

Header: ppltasks.h

Namespace: concurrency

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.