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:1441
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
1405 _M_pTask->_M_taskEventLogger._LogTaskCompleted();
_Task_ptr< _ReturnType >::_Type _M_pTask
Definition: ppltasks.h:1441
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
_Task_ptr< _ReturnType >::_Type _M_pTask
Definition: ppltasks.h:1441
template<typename _ReturnType, typename _DerivedTaskHandle, typename _BaseTaskHandle>
1413 if (!
_M_pTask->_TransitionedToStarted())
1415 static_cast<const _DerivedTaskHandle *
>(
this)->_SyncCancelAndPropagateException();
1419 _M_pTask->_M_taskEventLogger._LogTaskExecutionStarted();
1423 static_cast<const _DerivedTaskHandle *
>(
this)->_Perform();
1424 _CATCH(
const task_canceled &)
1426 _CATCH(const _Interruption_exception &)
1431 _M_pTask->_M_taskEventLogger._LogTaskExecutionCompleted();
#define _TRY_BEGIN
Definition: xstddef:60
#define _CATCH(x)
Definition: xstddef:61
#define _CATCH_END
Definition: xstddef:63
_Task_ptr< _ReturnType >::_Type _M_pTask
Definition: ppltasks.h:1441
#define _CATCH_ALL
Definition: xstddef:62
exception_ptr current_exception() _NOEXCEPT
Definition: exception:359
#define true
Definition: stdbool.h:17
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: