pplx Namespace

The pplx namespace provides classes and functions that give you access to the Concurrency Runtime, a concurrent programming framework for C++. For more information, see Concurrency Runtime.

Warning

This topic contains information for the C++ REST SDK 1.0 (codename "Casablanca"). If you are using a later version from the Codeplex Casablanca web page, then use the local documentation at http://casablanca.codeplex.com/documentation.

namespace pplx;

Members

Typedefs

Name

Description

task_status

A type that represents the terminal state of a task. Valid values are completed and canceled.

Classes

Name

Description

progress_reporter Class (C++ REST SDK)

The progress reporter class allows reporting progress notifications of a specific type. Each progress_reporter object is bound to a particular asynchronous action or operation.

task Class

The Parallel Patterns Library (PPL) task class. A task object represents work that can be executed asynchronously, and concurrently with other tasks and parallel work produced by parallel algorithms in the Concurrency Runtime. It produces a result of type _ResultType on successful completion. Tasks of type task<void> produce no result. A task can be waited upon and canceled independently of other tasks. It can also be composed with other tasks using continuations(then), and join(when_all) and choice(when_any) patterns.

task_completion_event Class (C++ REST SDK)

The task_completion_event class allows you to delay the execution of a task until a condition is satisfied, or start a task in response to an external event.

task_continuation_context Class (C++ REST SDK)

The task_continuation_context class allows you to specify where you would like a continuation to be executed. It is only useful to use this class from a Windows Store app. For non-Windows Store apps, the task continuation's execution context is determined by the runtime, and not configurable.

task_options Class

Represents the allowed options for creating a task

Functions

Name

Description

cancel_current_task Function (C++ REST SDK)

Cancels the currently executing task. This function can be called from within the body of a task to abort the task's execution and cause it to enter the canceled state. While it may be used in response to the is_task_cancellation_requested function, you may also use it by itself, to initiate cancellation of the task that is currently executing.

It is not a supported scenario to call this function if you are not within the body of a task. Doing so will result in undefined behavior such as a crash or a hang in your application.

create_async Function (C++ REST SDK)

Creates a Windows Runtime asynchronous construct based on a user supplied lambda or function object. The return type of create_async is one of either IAsyncAction^, IAsyncActionWithProgress<TProgress>^, IAsyncOperation<TResult>^, or IAsyncOperationWithProgress<TResult, TProgress>^ based on the signature of the lambda passed to the method.

create_task Function (C++ REST SDK)

is_task_cancellation_requested Function (C++ REST SDK)

Returns an indication of whether the task that is currently executing has received a request to cancel its execution. Cancellation is requested on a task if the task was created with a cancellation token, and the token source associated with that token is canceled.

task_from_exception Function

task_from_result Function

when_all Function (C++ REST SDK)

Creates a task that will complete successfully when all of the tasks supplied as arguments complete successfully.

when_any Function (C++ REST SDK)

Overloaded. Creates a task that will complete successfully when any of the tasks supplied as arguments completes successfully.

Operators

Name

Description

operator&& Operator (C++ REST SDK)

Overloaded. Creates a task that will complete succesfully when both of the tasks supplied as arguments complete successfully.

operator|| Operator (C++ REST SDK)

Requirements

Header: pplxtasks.h

See Also

Other Resources

Reference (C++ REST SDK)