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. 
 More... 
#include <pplxtasks.h>
wait to execute the task inline, if all of the tasks dependencies are satisfied, and it has not already been picked up for execution by a background worker. More... get will wait for the task to finish. This method does not return a value when called on a task with a result_type of void. More... IAsyncInfo interface or is descended from such a task. More... 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. 
For more information, see Task Parallelism (Concurrency Runtime).
The type of the result an object of this class produces.
Constructs a task object. 
The default constructor for a task is only present in order to allow tasks to be used within containers. A default constructed task cannot be used until you assign a valid task to it. Methods such as get, wait or then will throw an invalid_argument exception when called on a default constructed task. 
A task that is created from a task_completion_event  will complete (and have its continuations scheduled) when the task completion event is set.
The version of the constructor that takes a cancellation token creates a task that can be canceled using the cancellation_token_source  the token was obtained from. Tasks created without a cancellation token are not cancelable.
Tasks created from a Windows::Foundation::IAsyncInfo interface or a lambda that returns an IAsyncInfo interface reach their terminal state when the enclosed Windows Runtime asynchronous operation or action completes. Similarly, tasks created from a lamda that returns a task<result_type> reach their terminal state when the inner task reaches its terminal state, and not when the lamda returns.
task behaves like a smart pointer and is safe to pass around by value. It can be accessed by multiple threads without the need for locks.
The constructor overloads that take a Windows::Foundation::IAsyncInfo interface or a lambda returning such an interface, are only available to Windows Store apps.
For more information, see Task Parallelism (Concurrency Runtime).
Constructs a task object. 
task_completion_event<result_type> object, or a Windows::Foundation::IAsyncInfo if you are using tasks in your Windows Store app. The lambda or function object should be a type equivalent to std::function<X(void)>, where X can be a variable of type result_type, task<result_type>, or a Windows::Foundation::IAsyncInfo in Windows Store apps. The default constructor for a task is only present in order to allow tasks to be used within containers. A default constructed task cannot be used until you assign a valid task to it. Methods such as get, wait or then will throw an invalid_argument exception when called on a default constructed task. 
A task that is created from a task_completion_event  will complete (and have its continuations scheduled) when the task completion event is set.
The version of the constructor that takes a cancellation token creates a task that can be canceled using the cancellation_token_source  the token was obtained from. Tasks created without a cancellation token are not cancelable.
Tasks created from a Windows::Foundation::IAsyncInfo interface or a lambda that returns an IAsyncInfo interface reach their terminal state when the enclosed Windows Runtime asynchronous operation or action completes. Similarly, tasks created from a lamda that returns a task<result_type> reach their terminal state when the inner task reaches its terminal state, and not when the lamda returns.
task behaves like a smart pointer and is safe to pass around by value. It can be accessed by multiple threads without the need for locks.
The constructor overloads that take a Windows::Foundation::IAsyncInfo interface or a lambda returning such an interface, are only available to Windows Store apps.
For more information, see Task Parallelism (Concurrency Runtime).
Adds a continuation task to this task.
result_type or task<result_type>, where result_type is the type of the result this task produces. The overloads of then that take a lambda or functor that returns a Windows::Foundation::IAsyncInfo interface, are only available to Windows Store apps. 
For more information on how to use task continuations to compose asynchronous work, see Task Parallelism (Concurrency Runtime).
Create an underlying task implementation.
Return the underlying implementation for this task.
true )
 
 Sets a property determining whether the task is apartment aware.
Set the implementation of the task to be the supplied implementaion.
Set the implementation of the task to be the supplied implementaion using a move instead of a copy.
Sets a field in the task impl to the return callstack for calls to the task constructors and the then method.
details::_ForceInline 
 An internal version of then that takes additional flags and executes the continuation inline. Used for runtime internal continuations only.
Returns the result this task produced. If the task is not in a terminal state, a call to get will wait for the task to finish. This method does not return a value when called on a task with a result_type of void. 
If the task is canceled, a call to get will throw a task_canceled exception. If the task encountered an different exception or an exception was propagated to it from an antecedent task, a call to get will throw that exception. 
Determines whether the task unwraps a Windows Runtime IAsyncInfo interface or is descended from such a task. 
true if the task unwraps an IAsyncInfo interface or is descended from such a task, false otherwise. Determines if the task is completed.
The function returns true if the task is completed or canceled (with or without user exception).
Determines whether two task objects represent different internal tasks. 
true if the objects refer to different underlying tasks, and false otherwise. Determines whether two task objects represent the same internal task. 
true if the objects refer to the same underlying task, and false otherwise. Returns the scheduler for this task
Waits for this task to reach a terminal state. It is possible for wait to execute the task inline, if all of the tasks dependencies are satisfied, and it has not already been picked up for execution by a background worker. 
task_status value which could be either completed or canceled. If the task encountered an exception during execution, or an exception was propagated to it from an antecedent task, wait will throw that exception.