|  | 
|  | task () | 
|  | Constructs a taskobject.  More...
 | 
|  | 
| template<typename _Ty > | 
|  | __declspec (noinline) explicit task(_Ty _Param) | 
|  | Constructs a taskobject.  More...
 | 
|  | 
| template<typename _Ty > | 
|  | __declspec (noinline) explicit task(_Ty _Param | 
|  | Constructs a taskobject.  More...
 | 
|  | 
|  | _CreateImpl (_TaskOptions.get_cancellation_token()._GetImplValue(), _TaskOptions.get_scheduler()) | 
|  | 
|  | _SetTaskCreationCallstack (details::_get_internal_task_options(_TaskOptions)._M_hasPresetCreationCallstack?details::_get_internal_task_options(_TaskOptions)._M_presetCreationCallstack:_CAPTURE_CALLSTACK()) | 
|  | 
|  | _TaskInitMaybeFunctor (_Param, details::_IsCallable(_Param, 0)) | 
|  | 
|  | task (const task &_Other) | 
|  | Constructs a taskobject.  More...
 | 
|  | 
|  | task (task &&_Other) | 
|  | Constructs a taskobject.  More...
 | 
|  | 
| task & | operator= (const task &_Other) | 
|  | Replaces the contents of one taskobject with another.  More...
 | 
|  | 
| task & | operator= (task &&_Other) | 
|  | Replaces the contents of one taskobject with another.  More...
 | 
|  | 
| template<typename _Function > | 
|  | __declspec (noinline) auto then(const _Function &_Func) const -> typename details::_ContinuationTypeTraits< _Function, _ReturnType >::_TaskOfType | 
|  | Adds a continuation task to this task.  More... 
 | 
|  | 
| template<typename _Function > | 
|  | __declspec (noinline) auto then(const _Function &_Func | 
|  | Adds a continuation task to this task.  More... 
 | 
|  | 
| return | _ThenImpl (_Func, _TaskOptions) | 
|  | 
| template<typename _Function > | 
|  | __declspec (noinline) auto then(const _Function &_Func | 
|  | Adds a continuation task to this task.  More... 
 | 
|  | 
|  | details::_get_internal_task_options (_TaskOptions)._set_creation_callstack(_CAPTURE_CALLSTACK()) | 
|  | 
| return | _ThenImpl (_Func, _TaskOptions) | 
|  | 
| task_status | wait () const | 
|  | Waits for this task to reach a terminal state. It is possible for waitto 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...
 | 
|  | 
| _ReturnType | get () const | 
|  | Returns the result this task produced. If the task is not in a terminal state, a call to getwill wait for the task to finish. This method does not return a value when called on a task with aresult_typeofvoid.  More...
 | 
|  | 
| bool | is_done () const | 
|  | Determines if the task is completed.  More... 
 | 
|  | 
| scheduler_ptr | scheduler () const | 
|  | Returns the scheduler for this task  More... 
 | 
|  | 
| bool | is_apartment_aware () const | 
|  | Determines whether the task unwraps a Windows Runtime IAsyncInfointerface or is descended from such a task.  More...
 | 
|  | 
| bool | operator== (const task< _ReturnType > &_Rhs) const | 
|  | Determines whether two taskobjects represent the same internal task.  More...
 | 
|  | 
| bool | operator!= (const task< _ReturnType > &_Rhs) const | 
|  | Determines whether two taskobjects represent different internal tasks.  More...
 | 
|  | 
| void | _CreateImpl (details::_CancellationTokenState *_Ct, scheduler_ptr _Scheduler) | 
|  | Create an underlying task implementation.  More... 
 | 
|  | 
| const details::_Task_ptr< _ReturnType >::_Type & | _GetImpl () const | 
|  | Return the underlying implementation for this task.  More... 
 | 
|  | 
| void | _SetImpl (const typename details::_Task_ptr< _ReturnType >::_Type &_Impl) | 
|  | Set the implementation of the task to be the supplied implementaion.  More... 
 | 
|  | 
| void | _SetImpl (typename details::_Task_ptr< _ReturnType >::_Type &&_Impl) | 
|  | Set the implementation of the task to be the supplied implementaion using a move instead of a copy.  More... 
 | 
|  | 
| void | _SetAsync (bool _Async=true) | 
|  | Sets a property determining whether the task is apartment aware.  More... 
 | 
|  | 
| void | _SetTaskCreationCallstack (const details::_TaskCreationCallstack &_callstack) | 
|  | Sets a field in the task impl to the return callstack for calls to the task constructors and the then method.  More... 
 | 
|  | 
| template<typename _Function > | 
| auto | _Then (const _Function &_Func, details::_CancellationTokenState *_PTokenState, details::_TaskInliningMode_t _InliningMode=details::_ForceInline) const -> typename details::_ContinuationTypeTraits< _Function, _ReturnType >::_TaskOfType | 
|  | An internal version of then that takes additional flags and always execute the continuation inline by default. When _ForceInline is set to false, continuations inlining will be limited to default _DefaultAutoInline. This function is Used for runtime internal continuations only.  More... 
 | 
|  | 
|  | 
| template<typename _InternalReturnType , typename _Function > | 
| void | _TaskInitWithFunctor (const _Function &_Func) | 
|  | Initializes a task using a lambda, function pointer or function object.  More... 
 | 
|  | 
| void | _TaskInitNoFunctor (task_completion_event< _ReturnType > &_Event) | 
|  | Initializes a task using a task completion event.  More... 
 | 
|  | 
| template<typename _Function > | 
| void | _TaskInitMaybeFunctor (_Function &_Func, std::true_type) | 
|  | Initializes a task using a callable object.  More... 
 | 
|  | 
| template<typename _Ty > | 
| void | _TaskInitMaybeFunctor (_Ty &_Param, std::false_type) | 
|  | Initializes a task using a non-callable object.  More... 
 | 
|  | 
| template<typename _InternalReturnType , typename _Function > | 
| auto | _ThenImpl (const _Function &_Func, const task_options &_TaskOptions) const -> typename details::_ContinuationTypeTraits< _Function, _InternalReturnType >::_TaskOfType | 
|  | 
| template<typename _InternalReturnType , typename _Function > | 
| auto | _ThenImpl (const _Function &_Func, details::_CancellationTokenState *_PTokenState, const task_continuation_context &_ContinuationContext, scheduler_ptr _Scheduler, details::_TaskCreationCallstack _CreationStack, details::_TaskInliningMode_t _InliningMode=details::_NoInline) const -> typename details::_ContinuationTypeTraits< _Function, _InternalReturnType >::_TaskOfType | 
|  | The one and only implementation of then for void and non-void tasks.  More... 
 | 
|  | 
template<typename _ReturnType>
class Concurrency::task< _ReturnType >
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. 
- Template Parameters
- 
  
    | _ReturnType | The result type of this task. |  
 
For more information, see Task Parallelism (Concurrency Runtime). 
template<typename _ReturnType> 
 
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).
details::_Task_ptr< _ReturnType >::_Type _M_Impl
Definition: ppltasks.h:4105
 
 
 
template<typename _ReturnType> 
 
Constructs a task object. 
- Parameters
- 
  
    | _Other | The source taskobject. |  
 
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).
details::_Task_ptr< _ReturnType >::_Type _M_Impl
Definition: ppltasks.h:4105
 
 
 
template<typename _ReturnType> 
 
Constructs a task object. 
- Parameters
- 
  
    | _Other | The source taskobject. |  
 
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).
_OutIt move(_InIt _First, _InIt _Last, _OutIt _Dest)
Definition: xutility:2447
details::_Task_ptr< _ReturnType >::_Type _M_Impl
Definition: ppltasks.h:4105
 
 
 
template<typename _ReturnType> 
template<typename _Ty > 
 
Constructs a task object. 
- Template Parameters
- 
  
    | _Ty | The type of the parameter from which the task is to be constructed. |  
 
- Parameters
- 
  
    | _Param | The parameter from which the task is to be constructed. This could be a lambda, a function object, a 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 tostd::function<X(void)>, where X can be a variable of typeresult_type,task<result_type>, or a Windows::Foundation::IAsyncInfo in Windows Store apps. |  | _Token | The cancellation token to associate with this task. A task created without a cancellation token cannot be canceled. It implicitly receives the token cancellation_token::none(). |  
 
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).
 3204         details::_ValidateTaskConstructorArgs<_ReturnType,_Ty>(_Param);
 
 3206         _CreateImpl(_TaskOptions.get_cancellation_token()._GetImplValue(), _TaskOptions.get_scheduler());
 
const task_options & _TaskOptions
Definition: ppltasks.h:3250
auto _IsCallable(_Function _Func, int) -> decltype(_Func(), std::true_type())
Definition: ppltasks.h:395
_SetTaskCreationCallstack(details::_get_internal_task_options(_TaskOptions)._M_hasPresetCreationCallstack?details::_get_internal_task_options(_TaskOptions)._M_presetCreationCallstack:_CAPTURE_CALLSTACK())
_TaskInitMaybeFunctor(_Param, details::_IsCallable(_Param, 0))
#define _CAPTURE_CALLSTACK()
Helper macro to determine how many stack frames need to be saved. When any number less or equal to 1 ...
Definition: ppltasks.h:162
_CreateImpl(_TaskOptions.get_cancellation_token()._GetImplValue(), _TaskOptions.get_scheduler())
 
 
 
template<typename _ReturnType> 
template<typename _Ty > 
      
 
Constructs a task object. 
- Template Parameters
- 
  
    | _Ty | The type of the parameter from which the task is to be constructed. |  
 
- Parameters
- 
  
    | _Param | The parameter from which the task is to be constructed. This could be a lambda, a function object, a 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 tostd::function<X(void)>, where X can be a variable of typeresult_type,task<result_type>, or a Windows::Foundation::IAsyncInfo in Windows Store apps. |  | _TaskOptions | The task options include cancellation token, scheduler etc |  
 
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).
 
 
template<typename _ReturnType> 
template<typename _Function > 
      
 
Adds a continuation task to this task. 
- Template Parameters
- 
  
    | _Function | The type of the function object that will be invoked by this task. |  
 
- Parameters
- 
  
    | _Func | The continuation function to execute when this task completes. This continuation function must take as input a variable of either result_typeortask<result_type>, whereresult_typeis the type of the result this task produces. |  | _TaskOptions | The task options include cancellation token, scheduler and continuation context. By default the former 3 options are inherited from the antecedent task |  
 
- Returns
- The newly created continuation task. The result type of the returned task is determined by what _Func  returns. 
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).
 
 
template<typename _ReturnType> 
template<typename _Function > 
      
 
Adds a continuation task to this task. 
- Template Parameters
- 
  
    | _Function | The type of the function object that will be invoked by this task. |  
 
- Parameters
- 
  
    | _Func | The continuation function to execute when this task completes. This continuation function must take as input a variable of either result_typeortask<result_type>, whereresult_typeis the type of the result this task produces. |  | _CancellationToken | The cancellation token to associate with the continuation task. A continuation task that is created without a cancellation token will inherit the token of its antecedent task. |  | _ContinuationContext | A variable that specifies where the continuation should execute. This variable is only useful when used in a Windows Store style app. For more information, see task_continuation_context |  
 
- Returns
- The newly created continuation task. The result type of the returned task is determined by what _Func  returns. 
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).