The _PPLTaskHandle is the strong-typed task handle base. All user task functions need to be wrapped in this task handler to be executable by PPL. By deriving from a different _BaseTaskHandle, it can be used for both initial tasks and continuation tasks. For initial tasks, _PPLTaskHandle will be derived from _UnrealizedChore_t, and for continuation tasks, it will be derived from _ContinuationTaskHandleBase. The life time of the _PPLTaskHandle object is be managed by runtime if task handle is scheduled.
More...
#include <ppltasks.h>
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
struct Concurrency::details::_PPLTaskHandle< _ReturnType, _DerivedTaskHandle, _BaseTaskHandle >
The _PPLTaskHandle is the strong-typed task handle base. All user task functions need to be wrapped in this task handler to be executable by PPL. By deriving from a different _BaseTaskHandle, it can be used for both initial tasks and continuation tasks. For initial tasks, _PPLTaskHandle will be derived from _UnrealizedChore_t, and for continuation tasks, it will be derived from _ContinuationTaskHandleBase. The life time of the _PPLTaskHandle object is be managed by runtime if task handle is scheduled.
- Template Parameters
-
_ReturnType | The result type of the _Task_impl. |
_DerivedTaskHandle | The derived task handle class. The operator () needs to be implemented. |
_BaseTaskHandle | The base class from which _PPLTaskHandle should be derived. This is either _UnrealizedChore_t or _ContinuationTaskHandleBase. |
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
_Task_ptr< _ReturnType >::_Type _M_pTask
Definition: ppltasks.h:1635
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
1587 _M_pTask->_M_taskEventLogger._LogTaskCompleted();
_Task_ptr< _ReturnType >::_Type _M_pTask
Definition: ppltasks.h:1635
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
_Task_ptr< _ReturnType >::_Type _M_pTask
Definition: ppltasks.h:1635
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
1595 if (!
_M_pTask->_TransitionedToStarted())
1597 static_cast<const _DerivedTaskHandle *
>(
this)->_SyncCancelAndPropagateException();
1601 _M_pTask->_M_taskEventLogger._LogTaskExecutionStarted();
1605 static_cast<const _DerivedTaskHandle *
>(
this)->_Perform();
1607 catch(
const task_canceled &)
1611 catch(
const _Interruption_exception &)
1615 #if defined (__cplusplus_winrt)
1616 catch(::Platform::Exception^ _E)
1618 _M_pTask->_CancelWithException(_E);
1625 _M_pTask->_M_taskEventLogger._LogTaskExecutionCompleted();
exception_ptr current_exception()
Definition: exception:527
_Task_ptr< _ReturnType >::_Type _M_pTask
Definition: ppltasks.h:1635
#define _ASSERTE(expr)
Definition: crtdbg.h:216
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
The documentation for this struct was generated from the following file: