31 #if (defined(_MSC_VER) && (_MSC_VER >= 1800)) && !CPPREST_FORCE_PPLX
32 #error This file must not be included for Visual Studio 12 or later
36 #if defined(_WIN32) || defined(__cplusplus_winrt)
45 #define _PPLXIMP __declspec(dllexport)
47 #define _PPLXIMP __declspec(dllimport)
51 #include "cpprest/details/cpprest_compat.h"
55 #include "pplx/pplxwin.h"
56 #elif defined(__APPLE__)
59 #include "pplx/pplxlinux.h"
61 #include "pplx/pplxlinux.h"
65 #include "pplx/pplxcancellation_token.h"
71 #pragma warning(disable: 4127)
74 #pragma pack(push,_CRT_PACKING)
87 _PPLXIMP
void _pplx_cdecl
set_ambient_scheduler(std::shared_ptr<pplx::scheduler_interface> _Scheduler);
107 template<
typename _T>
122 virtual void invoke()
const = 0;
124 static void _pplx_cdecl _RunChoreBridge(
void * _Parameter)
128 _PTaskHandle->invoke();
132 enum _TaskInliningMode
137 _DefaultAutoInline = 16,
153 : _M_pScheduler(_PScheduler)
157 void _ScheduleTask(_TaskProcHandle_t* _PTaskHandle, _TaskInliningMode _InliningMode)
159 if (_InliningMode == _ForceInline)
161 _TaskProcHandle_t::_RunChoreBridge(_PTaskHandle);
165 _M_pScheduler->schedule(_TaskProcHandle_t::_RunChoreBridge, _PTaskHandle);
192 return _M_pScheduler;
196 static void _RunTask(
TaskProc_t _Proc,
void * _Parameter, _TaskInliningMode _InliningMode)
198 if (_InliningMode == _ForceInline)
209 static bool _pplx_cdecl _Is_cancellation_requested()
225 typedef _TaskInliningMode _TaskInliningMode_t;
233 #if defined(_MSC_VER)
void(_pplx_cdecl * TaskProc_t)(void *)
An elementary abstraction for a task, defined as void (__cdecl * TaskProc_t)(void *)...
Definition: pplxinterface.h:59
_PPLXIMP void _pplx_cdecl set_ambient_scheduler(std::shared_ptr< pplx::scheduler_interface > _Scheduler)
Sets the ambient scheduler to be used by the PPL constructs.
The pplx namespace provides classes and functions that give you access to the Concurrency Runtime...
Definition: pplx.h:81
_PPLXIMP std::shared_ptr< pplx::scheduler_interface > _pplx_cdecl get_ambient_scheduler()
Gets the ambient scheduler to be used by the PPL constructs
Represents a pointer to a scheduler. This class exists to allow the the specification of a shared lif...
Definition: pplxinterface.h:74
Manual reset event
Definition: pplxlinux.h:84