32 #error This is only supported on Windows
35 #if defined(_MSC_VER) && (_MSC_VER >= 1700) && (_MSC_VER < 1800) && !CPPREST_FORCE_PPLX
38 #include "pplx/pplxtasks.h"
42 namespace _Ppl_conv_helpers
44 template<
typename _Tc,
typename _F>
45 auto _Set_value(_Tc _Tcp,
const _F& _Func) -> decltype(_Tcp.set(_Func())) {
return _Tcp.set(_Func()); }
47 template<
typename _Tc,
typename _F>
48 auto _Set_value(_Tc _Tcp,
const _F& _Func, ...) -> decltype(_Tcp.set()) { _Func();
return _Tcp.set(); }
50 template<
typename _TaskType,
typename _OtherTaskType,
typename _OtherTCEType>
51 _OtherTaskType _Convert_task(_TaskType _Task)
54 _Task.then([_Tc](_TaskType _Task2) {
57 _Ppl_conv_helpers::_Set_value(_Tc, [=]{
return _Task2.get(); });
61 _Tc.set_exception(std::current_exception());
64 _OtherTaskType _T_other(_Tc);
69 template<
typename _TaskType>
72 return _Ppl_conv_helpers::_Convert_task<typename pplx::task<_TaskType>, concurrency::task<_TaskType>, concurrency::task_completion_event<_TaskType>>(_Task);
75 template<
typename _TaskType>
The pplx namespace provides classes and functions that give you access to the Concurrency Runtime...
Definition: pplx.h:81
The Parallel Patterns Library (PPL) task class. A task object represents work that can be executed as...
Definition: pplxtasks.h:176
The task_completion_event class allows you to delay the execution of a task until a condition is sati...
Definition: pplxtasks.h:2674