task_continuation_context::use_current 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.
0 out of 3 rated this helpful - Rate this topic
Visual Studio 2012

Returns a task continuation context object that represents the current execution context.

static task_continuation_context use_current();

The current execution context.

This method captures the caller's Windows Runtime context so that continuations can be executed in the right apartment.

The value returned by use_current can be used to indicate to the Runtime that the continuation should execute in the captured context (STA vs MTA) regardless of whether or not the antecedent task is apartment aware. An apartment aware task is a task that unwraps a Windows Runtime IAsyncInfo interface, or a task that is descended from such a task.

This method is only available to Metro style apps.

Header: ppltasks.h

Namespace: concurrency

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