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.

task_continuation_context::use_current Method

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 Windows Store apps.

Header: ppltasks.h

Namespace: concurrency

Show:
© 2014 Microsoft