Home | History | Annotate | Download | only in src

Lines Matching full:details

165 #define _CAPTURE_CALLSTACK() ::Concurrency_winrt::details::_TaskCreationCallstack::_CaptureSingleFrameCallstack(_ReturnAddress())
167 #define _CAPTURE_CALLSTACK() ::Concurrency_winrt::details::_TaskCreationCallstack::_CaptureMultiFramesCallstack(PPL_TASK_SAVE_FRAME_COUNT)
170 #define _CAPTURE_CALLSTACK() ::Concurrency_winrt::details::_TaskCreationCallstack::_CaptureSingleFrameCallstack(_ReturnAddress())
208 return ::Concurrency::details::_TaskCollection_t::_Is_cancellation_requested();
238 namespace details
274 _csc._M_frames.resize(::Concurrency::details::platform::CaptureCallstack(&_csc._M_frames[0], 2, _CaptureFrames));
395 std::is_same<_TypeSelectorAsyncAction, decltype(details::_AsyncOperationKindSelector(stdx::declval<_Type>()))>::value ||
396 std::is_same<_TypeSelectorAsyncOperation, decltype(details::_AsyncOperationKindSelector(stdx::declval<_Type>()))>::value ||
397 std::is_same<_TypeSelectorAsyncOperationWithProgress, decltype(details::_AsyncOperationKindSelector(stdx::declval<_Type>()))>::value ||
398 std::is_same<_TypeSelectorAsyncActionWithProgress, decltype(details::_AsyncOperationKindSelector(stdx::declval<_Type>()))>::value;
447 typedef typename details::_UnwrapTaskType<_Type>::_Type _TaskRetType;
450 typedef typename details::_NormalizeVoidToUnitType<_TaskRetType>::_Type _NormalizedTaskRetType;
453 static const bool _IsUnwrappedTaskOrAsync = details::_IsUnwrappedAsyncSelector<_AsyncKind>::_Value;
465 static const bool _IsUnwrappedTaskOrAsync = details::_IsUnwrappedAsyncSelector<_AsyncKind>::_Value;
1058 typedef Concurrency::details::_TaskInliningMode_t _TaskInliningMode;
1060 typedef Concurrency::details::_TaskInliningMode _TaskInliningMode;
1065 Concurrency::details::_TaskCollection_t::_RunTask(&_TaskProcThunk::_Bridge, new _TaskProcThunk(_Func), _InliningMode);
1067 Concurrency::details::_StackGuard _Guard;
1074 Concurrency::details::_CurrentScheduler::_ScheduleTask(reinterpret_cast<Concurrency::TaskProc>(&_TaskProcThunk::_Bridge), new _TaskProcThunk(_Func));
1627 Concurrency::details::_ReportUnobservedException();
1637 Concurrency::details::atomic_exchange(_M_exceptionObserved, 1l);
1653 Concurrency::details::atomic_long _M_exceptionObserved;
1675 extern const __declspec(selectany) WCHAR RuntimeClass_Concurrency_winrt_details__AsyncInfoImpl[] = L"Concurrency_winrt.details._AsyncInfoImpl";
1880 virtual STDMETHODIMP GetResults(details::_Unit_type* results)
1934 class task_continuation_context : public details::_ContextCallback
2005 task_continuation_context(bool _DeferCapture = false) : details::_ContextCallback(_DeferCapture)
2012 namespace details
2198 friend details::_Internal_task_options &details::_get_internal_task_options(task_options &);
2199 friend const details::_Internal_task_options &details::_get_internal_task_options(const task_options &);
2204 details::_Internal_task_options _M_InternalTaskOptions;
2210 namespace details
2230 static _Type _Make(Concurrency::details::_CancellationTokenState * _Ct, Concurrency::scheduler_ptr _Scheduler_arg) { return std::make_shared<_Task_impl<_ReturnType>>(_Ct, _Scheduler_arg); }
2232 static _Type _Make(Concurrency::details::_CancellationTokenState * _Ct) { return std::make_shared<_Task_impl<_ReturnType>>(_Ct); }
2236 typedef Concurrency::details::_TaskCollection_t::_TaskProcHandle_t _UnrealizedChore_t;
2240 typedef Concurrency::details::atomic_size_t atomic_size_t;
2242 typedef Concurrency::details::_UnrealizedChore _UnrealizedChore;
2261 _M_next(nullptr), _M_isTaskBasedContinuation(false), _M_continuationContext(task_continuation_context::use_default()), _M_inliningMode(Concurrency::details::_NoInline)
2315 if (details::_IsCausalitySupported())
2327 if (details::_IsCausalitySupported())
2344 if (_M_taskPostEventStarted && details::_IsCausalitySupported())
2354 if (details::_IsCausalitySupported())
2364 if (details::_IsCausalitySupported())
2478 catch (const Concurrency::details::_Interruption_exception &)
2519 /// implementation details of the task.
2534 _Task_impl_base(Concurrency::details::_CancellationTokenState * _PTokenState, Concurrency::scheduler_ptr _Scheduler_arg)
2540 _Task_impl_base(Concurrency::details::_CancellationTokenState * _PTokenState) : _M_TaskState(_Created),
2549 if (_M_pTokenState != Concurrency::details::_CancellationTokenState::_None())
2557 if (_M_pTokenState != Concurrency::details::_CancellationTokenState::_None())
2641 catch (Concurrency::details::_Interruption_exception&)
2761 _CONCRT_ASSERT(Concurrency::details::_CancellationTokenState::_IsValid(_M_pTokenState));
2771 _M_pRegistration = new Concurrency::details::_CancellationTokenCallback<decltype(_CancellationCallback)>(_CancellationCallback);
2877 _M_pTaskCollection = Concurrency::details::_AsyncTaskCollection::_NewCollection(Concurrency::details::_CancellationTokenState::_None());
2885 // Do not need to check its returning state, more details please refer to _Wait method.
2897 catch (const Concurrency::details::_Interruption_exception &)
2978 if (_PTaskHandle->_M_inliningMode != Concurrency::details::_ForceInline)
2980 _PTaskHandle->_M_inliningMode = Concurrency::details::_DefaultAutoInline;
2982 details::_ScheduleFuncWithAutoInline([_PTaskHandle]() -> HRESULT {
2986 if (details::_ContextCallback::_CaptureCurrent() == _PTaskHandle->_M_continuationContext)
2988 _TaskImplPtr->_ScheduleTask(_PTaskHandle, Concurrency::details::_ForceInline);
3005 _TaskImplPtr->_ScheduleTask(_PTaskHandle1, Concurrency::details::_ForceInline);
3248 }, nullptr, Concurrency::details::_DefaultAutoInline);
3250 }, nullptr, false, Concurrency::details::_DefaultAutoInline);
3288 Concurrency::details::_CancellationTokenState * _M_pTokenState;
3291 Concurrency::details::_CancellationTokenRegistration * _M_pRegistration;
3295 Concurrency::details::_TaskCollection_t _M_TaskCollection;
3302 Concurrency::details::_AsyncTaskCollection * _M_pTaskCollection;
3328 if (details::_IsCausalitySupported())
3343 _Task_impl(Concurrency::details::_CancellationTokenState * _Ct, Concurrency::scheduler_ptr _Scheduler_arg)
3346 _Task_impl(Concurrency::details::_CancellationTokenState * _Ct) : _Task_impl_base(_Ct)
3479 details::_ScheduleFuncWithAutoInline([=]() -> HRESULT { _RunTaskContinuations(); return S_OK; }, Concurrency::details::_DefaultAutoInline);
3676 task_completion_event() : _M_Impl(std::make_shared<details::_Task_completion_event_impl<_ResultType>>())
3707 details::scoped_lock _LockHolder(_M_Impl->_M_taskListCritSec);
3799 bool _Cancel(_ExHolderType _ExHolder, const details::_TaskCreationCallstack &_SetExceptionAddressHint = details::_TaskCreationCallstack()) const
3829 bool _StoreException(_ExHolderType _ExHolder, const details::_TaskCreationCallstack &_SetExceptionAddressHint = details::_TaskCreationCallstack()) const
3834 details::scoped_lock _LockHolder(_M_Impl->_M_taskListCritSec);
3856 static std::shared_ptr<details::_ExceptionHolder> _ToExceptionHolder(const std::shared_ptr<details::_ExceptionHolder>& _ExHolder, const details::_TaskCreationCallstack&)
3858 static std::shared_ptr<details::_ExceptionHolder> _ToExceptionHolder(const std::shared_ptr<details::_ExceptionHolder>& _ExHolder, void*)
3865 static std::shared_ptr<details::_ExceptionHolder> _ToExceptionHolder(std::exception_ptr _ExceptionPtr, const details::_TaskCreationCallstack &_SetExceptionAddressHint)
3867 static std::shared_ptr<details::_ExceptionHolder> _ToExceptionHolder(std::exception_ptr _ExceptionPtr, void* _SetExceptionAddressHint)
3870 return std::make_shared<details::_ExceptionHolder>(_ExceptionPtr, _SetExceptionAddressHint);
3876 typedef typename details::_Task_completion_event_impl<_ResultType>::_TaskList _TaskList;
3894 details::scoped_lock _LockHolder(_M_Impl->_M_taskListCritSec);
3928 void _RegisterTask(const typename details::_Task_ptr<_ResultType>::_Type & _TaskParam)
3930 details::scoped_lock _LockHolder(_M_Impl->_M_taskListCritSec);
3953 std::shared_ptr<details::_Task_completion_event_impl<_ResultType>> _M_Impl;
3989 return _M_unitEvent.set(details::_Unit_type());
4032 void _Cancel(const std::shared_ptr<details::_ExceptionHolder>& _ExHolder) const
4042 bool _StoreException(const std::shared_ptr<details::_ExceptionHolder>& _ExHolder) const
4062 void _RegisterTask(details::_Task_ptr<details::_Unit_type>::_Type _TaskParam)
4068 task_completion_event<details::_Unit_type> _M_unitEvent;
4070 namespace details
4113 static_assert(std::is_same<decltype(details::_IsValidTaskCtor<_ReturnType>(_Param, 0, 0, 0, 0, 0, 0, 0)), std::true_type>::value,
4116 static_assert(!(std::is_same<_Ty, _ReturnType>::value && details::_IsIAsyncInfo<_Ty>::_Value),
4139 static auto _IsValidCreateAsync(_Ty _Param, int, int, int, int, ...) -> typename decltype(_Param(details::_ProgressReporterCtorArgType()), std::true_type());
4143 static auto _IsValidCreateAsync(_Ty _Param, int, int, int, ...) -> typename decltype(_Param(details::_ProgressReporterCtorArgType(), stdx::declval<_ReturnType*>()), std::true_type());
4147 static auto _IsValidCreateAsync(_Ty _Param, int, int, ...) -> typename decltype(_Param(details::_ProgressReporterCtorArgType(), Concurrency::cancellation_token::none()), std::true_type());
4151 static auto _IsValidCreateAsync(_Ty _Param, int, ...) -> typename decltype(_Param(details::_ProgressReporterCtorArgType(), Concurrency::cancellation_token::none(), stdx::declval<_ReturnType*>()), std::true_type());
4252 details::_ValidateTaskConstructorArgs<_ReturnType, _Ty>(_Param);
4265 _TaskInitMaybeFunctor(_Param, details::_IsCallable<_ReturnType>(_Param, 0, 0, 0));
4311 details::_ValidateTaskConstructorArgs<_ReturnType, _Ty>(_Param);
4320 _SetTaskCreationCallstack(details::_get_internal_task_options(_TaskOptions)._M_hasPresetCreationCallstack ? details::_get_internal_task_options(_TaskOptions)._M_presetCreationCallstack : _CAPTURE_CALLSTACK());
4324 _TaskInitMaybeFunctor(_Param, details::_IsCallable<_ReturnType>(_Param, 0, 0, 0));
4443 auto then(const _Function& _Func) const -> typename details::_ContinuationTypeTraits<_Function, _ReturnType>::_TaskOfType
4447 details::_get_internal_task_options(_TaskOptions)._set_creation_callstack(_CAPTURE_CALLSTACK());
4484 auto then(const _Function& _Func, task_options _TaskOptions) const -> typename details::_ContinuationTypeTraits<_Function, _ReturnType>::_TaskOfType
4486 auto then(const _Function& _Func, Concurrency::cancellation_token _CancellationToken) const -> typename details::_ContinuationTypeTraits<_Function, _ReturnType>::_TaskOfType
4490 details::_get_internal_task_options(_TaskOptions)._set_creation_callstack(_CAPTURE_CALLSTACK());
4526 auto then(const _Function& _Func, task_continuation_context _ContinuationContext) const -> typename details::_ContinuationTypeTraits<_Function, _ReturnType>::_TaskOfType
4564 auto then(const _Function& _Func, Concurrency::cancellation_token _CancellationToken, task_continuation_context _ContinuationContext) const -> typename details::_ContinuationTypeTraits<_Function, _ReturnType>::_TaskOfType
4568 details::_get_internal_task_options(_TaskOptions)._set_creation_callstack(_CAPTURE_CALLSTACK());
4703 void _CreateImpl(Concurrency::details::_CancellationTokenState * _Ct, Concurrency::scheduler_ptr _Scheduler)
4705 void _CreateImpl(Concurrency::details::_CancellationTokenState * _Ct)
4710 _M_Impl = details::_Task_ptr<_ReturnType>::_Make(_Ct, _Scheduler);
4712 _M_Impl = details::_Task_ptr<_ReturnType>::_Make(_Ct);
4714 if (_Ct != Concurrency::details::_CancellationTokenState::_None())
4727 const typename details::_Task_ptr<_ReturnType>::_Type & _GetImpl() const
4735 void _SetImpl(const typename details::_Task_ptr<_ReturnType>::_Type & _Impl)
4744 void _SetImpl(typename details::_Task_ptr<_ReturnType>::_Type && _Impl)
4762 void _SetTaskCreationCallstack(const details::_TaskCreationCallstack &_callstack)
4779 auto _Then(const _Function& _Func, Concurrency::details::_CancellationTokenState *_PTokenState,
4780 details::_TaskInliningMode _InliningMode = Concurrency::details::_ForceInline) const -> typename details::_ContinuationTypeTraits<_Function, _ReturnType>::_TaskOfType
4788 auto _Then(const _Function& _Func, Concurrency::details::_CancellationTokenState *_PTokenState, bool _Aggregating,
4789 details::_TaskInliningMode _InliningMode = Concurrency::details::_ForceInline) const -> typename details::_ContinuationTypeTraits<_Function, _ReturnType>::_TaskOfType
4798 // A helper class template that transforms an intial task lambda returns void into a lambda that returns a non-void type (details::_Unit_type is used
4814 static auto _Perform(std::function<HRESULT(void)> _Func) -> decltype(details::_MakeVoidToUnitFunc(_Func))
4816 return details::_MakeVoidToUnitFunc(_Func);
4823 details::_PPLTaskHandle<_ReturnType, _InitialTaskHandle<_InternalReturnType, _Function, _TypeSelection>, details::_UnrealizedChore>
4826 _InitialTaskHandle(const typename details::_Task_ptr<_ReturnType>::_Type & _TaskImpl, const _Function & _Function) : _M_function(_Function), _PPLTaskHandle(_TaskImpl)
4835 details::_TaskWorkItemRAIILogger _LogWorkItem(this->_M_pTask->_M_taskEventLogger);
4856 void _Init(details::_TypeSelectorNoAsync) const
4876 void _Init(details::_TypeSelectorAsyncTask) const
4885 details::_Task_impl_base::_AsyncInit<_ReturnType, _InternalReturnType>(_M_pTask, retVal);
4887 void _Init(details::_TypeSelectorAsyncOperation) const
4896 details::_Task_impl_base::_AsyncInit<_ReturnType, _InternalReturnType>(_M_pTask,
4897 Microsoft::WRL::Make<details::_IAsyncOperationToAsyncOperationConverter<_InternalReturnType>>(retVal).Get());
4905 void _Init(details::_TypeSelectorAsyncAction) const
4914 details::_Task_impl_base::_AsyncInit<_ReturnType, _InternalReturnType>(_M_pTask, Microsoft::WRL::Make<details::_IAsyncActionToAsyncOperationConverter>(retVal).Get());
4922 void _Init(details::_TypeSelectorAsyncOperationWithProgress) const
4924 typedef details::_GetProgressType<decltype(_M_function())>::_Value _ProgressType;
4932 details::_Task_impl_base::_AsyncInit<_ReturnType, _InternalReturnType>(_M_pTask,
4933 Microsoft::WRL::Make<details::_IAsyncOperationWithProgressToAsyncOperationConverter<_InternalReturnType, _ProgressType>>(retVal).Get());
4941 void _Init(details::_TypeSelectorAsyncActionWithProgress) const
4943 typedef details::_GetProgressType<decltype(_M_function())>::_Value _ProgressType;
4951 details::_Task_impl_base::_AsyncInit<_ReturnType, _InternalReturnType>(_M_pTask,
4952 Microsoft::WRL::Make<details::_IAsyncActionWithProgressToAsyncOperationConverter<_ProgressType>>(retVal).Get());
4958 /// non-void type (details::_Unit_type is used to substitute for void). This is to minimize the special handling required for 'void'.
4974 static auto _Perform(std::function<HRESULT(_OutType*)> _Func) -> decltype(details::_MakeUnitToTFunc<_OutType>(_Func))
4976 return details::_MakeUnitToTFunc<_OutType>(_Func);
4984 static auto _Perform(std::function<HRESULT(_InType)> _Func) -> decltype(details::_MakeTToUnitFunc<_InType>(_Func))
4986 return details::_MakeTToUnitFunc<_InType>(_Func);
4994 static auto _Perform(std::function<HRESULT(void)> _Func) -> decltype(details::_MakeUnitToUnitFunc(_Func))
4996 return details::_MakeUnitToUnitFunc(_Func);
5004 details::_PPLTaskHandle<typename details::_NormalizeVoidToUnitType<_ContinuationReturnType>::_Type,
5005 _ContinuationTaskHandle<_InternalReturnType, _ContinuationReturnType, _Function, _IsTaskBased, _TypeSelection>, details::_ContinuationTaskHandleBase>
5007 typedef typename details::_NormalizeVoidToUnitType<_ContinuationReturnType>::_Type _NormalizedContinuationReturnType;
5009 typename details::_Task_ptr<_ReturnType>::_Type _M_ancestorTaskImpl;
5012 _ContinuationTaskHandle(const typename details::_Task_ptr<_ReturnType>::_Type & _AncestorImpl,
5013 const typename details::_Task_ptr<_NormalizedContinuationReturnType>::_Type & _ContinuationImpl,
5014 const _Function & _Func, const task_continuation_context & _Context, details::_TaskInliningMode _InliningMode) :
5016 details::_PPLTaskHandle<typename details::_NormalizeVoidToUnitType<_ContinuationReturnType>::_Type,
5017 _ContinuationTaskHandle<_InternalReturnType, _ContinuationReturnType, _Function, _IsTaskBased, _TypeSelection>, details::_ContinuationTaskHandleBase>
5037 details::_TaskWorkItemRAIILogger _LogWorkItem(this->_M_pTask->_M_taskEventLogger);
5070 void _Continue(std::false_type, details::_TypeSelectorNoAsync) const
5090 void _Continue(std::false_type, details::_TypeSelectorAsyncTask) const
5092 typedef typename details::_FunctionTypeTraits<_Function, _InternalReturnType>::_FuncRetType _FuncOutputType;
5100 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(
5105 void _Continue(std::false_type, details::_TypeSelectorAsyncOperation) const
5107 typedef typename details::_FunctionTypeTraits<_Function, _InternalReturnType>::_FuncRetType _FuncOutputType;
5115 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(
5117 Microsoft::WRL::Make<details::_IAsyncOperationToAsyncOperationConverter<_ContinuationReturnType>>(retVal).Get());
5125 void _Continue(std::false_type, details::_TypeSelectorAsyncAction) const
5127 typedef details::_FunctionTypeTraits<_Function, _InternalReturnType>::_FuncRetType _FuncOutputType;
5135 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(
5137 Microsoft::WRL::Make<details::_IAsyncActionToAsyncOperationConverter>(
5146 void _Continue(std::false_type, details::_TypeSelectorAsyncOperationWithProgress) const
5148 typedef details::_FunctionTypeTraits<_Function, _InternalReturnType>::_FuncRetType _FuncOutputType;
5156 typedef details::_GetProgressType<decltype(_OpWithProgress)>::_Value _ProgressType;
5159 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(
5161 Microsoft::WRL::Make<details::_IAsyncOperationWithProgressToAsyncOperationConverter<_ContinuationReturnType, _ProgressType>>(_OpWithProgress).Get());
5169 void _Continue(std::false_type, details::_TypeSelectorAsyncActionWithProgress) const
5171 typedef details::_FunctionTypeTraits<_Function, _InternalReturnType>::_FuncRetType _FuncOutputType;
5179 typedef details::_GetProgressType<decltype(_OpWithProgress)>::_Value _ProgressType;
5182 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(
5184 Microsoft::WRL::Make<details::_IAsyncActionWithProgressToAsyncOperationConverter<_ProgressType>>(_OpWithProgress).Get());
5193 void _Continue(std::true_type, details::_TypeSelectorNoAsync) const
5217 void _Continue(std::true_type, details::_TypeSelectorAsyncTask) const
5229 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(_M_pTask, retVal);
5231 void _Continue(std::true_type, details::_TypeSelectorAsyncOperation) const
5243 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(_M_pTask,
5244 Microsoft::WRL::Make<details::_IAsyncOperationToAsyncOperationConverter<_ContinuationReturnType>>(retVal));
5253 void _Continue(std::true_type, details::_TypeSelectorAsyncAction) const
5265 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(_M_pTask,
5266 Microsoft::WRL::Make<details::_IAsyncActionToAsyncOperationConverter>(retVal));
5276 void _Continue(std::true_type, details::_TypeSelectorAsyncOperationWithProgress) const
5282 typedef details::_GetProgressType<decltype(_M_function(_ResultTask))>::_Value _ProgressType;
5290 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(_M_pTask,
5291 Microsoft::WRL::Make<details::_IAsyncOperationWithProgressToAsyncOperationConverter<_ContinuationReturnType, _ProgressType>>(retVal));
5301 void _Continue(std::true_type, details::_TypeSelectorAsyncActionWithProgress) const
5307 typedef details::_GetProgressType<decltype(_M_function(_ResultTask))>::_Value _ProgressType;
5315 details::_Task_impl_base::_AsyncInit<_NormalizedContinuationReturnType, _ContinuationReturnType>(_M_pTask,
5316 Microsoft::WRL::Make<details::_IAsyncActionWithProgressToAsyncOperationConverter<_ProgressType>>(retVal));
5325 typedef details::_InitFunctorTypeTraits<_InternalReturnType, details::_FunctionTypeTraits<_Function, void>::_FuncRetType> _Async_type_traits;
5332 _M_Impl->_ScheduleTask(new _InitialTaskHandle<_InternalReturnType, _Function, typename _Async_type_traits::_AsyncKind>(_GetImpl(), _Func), Concurrency::details::_NoInline);
5347 void _TaskInitAsyncOp(details::_AsyncInfoImpl<_OpType, _CompHandlerType, _ResultType>* _AsyncOp)
5355 _M_Impl->_M_TaskState = details::_Task_impl_base::_Started;
5357 details::_Task_impl_base::_AsyncInit<_ReturnType, _Result>(_M_Impl, _AsyncOp);
5366 _TaskInitAsyncOp<_Result>(Microsoft::WRL::Make<details::_IAsyncOperationToAsyncOperationConverter<_Result>>(_AsyncOp).Get());
5375 _TaskInitAsyncOp<_Result>(Microsoft::WRL::Make<details::_IAsyncOperationWithProgressToAsyncOperationConverter<_Result, _Progress>>(_AsyncOp).Get());
5396 auto _ThenImpl(const _Function& _Func, const task_options& _TaskOptions) const -> typename details::_ContinuationTypeTraits<_Function, _InternalReturnType>::_TaskOfType
5403 Concurrency::details::_CancellationTokenState *_PTokenState = _TaskOptions.has_cancellation_token() ? _TaskOptions.get_cancellation_token()._GetImplValue() : nullptr;
5405 auto _CreationStack = details::_get_internal_task_options(_TaskOptions)._M_hasPresetCreationCallstack ? details::_get_internal_task_options(_TaskOptions)._M_presetCreationCallstack : details::_TaskCreationCallstack();
5414 auto _ThenImpl(const _Function& _Func, Concurrency::details::_CancellationTokenState *_PTokenState, const task_continuation_context& _ContinuationContext, Concurrency::scheduler_ptr _Scheduler, details::_TaskCreationCallstack _CreationStack,
5415 details::_TaskInliningMode _InliningMode = Concurrency::details::_NoInline) const -> typename details::_ContinuationTypeTraits<_Function, _InternalReturnType>::_TaskOfType
5417 auto _ThenImpl(const _Function& _Func, Concurrency::details::_CancellationTokenState *_PTokenState, const task_continuation_context& _ContinuationContext,
5418 bool _Aggregating = false, details::_TaskInliningMode _InliningMode = Concurrency::details::_NoInline) const -> typename details::_ContinuationTypeTraits<_Function, _InternalReturnType>::_TaskOfType
5426 typedef details::_FunctionTypeTraits<_Function, _InternalReturnType> _Function_type_traits;
5427 typedef details::_TaskTypeTraits<typename _Function_type_traits::_FuncRetType> _Async_type_traits;
5443 _PTokenState = Concurrency::details::_CancellationTokenState::_None();
5472 typename details::_Task_ptr<_ReturnType>::_Type _M_Impl;
5559 details::_ValidateTaskConstructorArgs<void, _Ty>(_Param);
5565 _TaskInitMaybeFunctor(_Param, details::_IsCallable<void>(_Param, 0, 0, 0));
5611 details::_ValidateTaskConstructorArgs<void, _Ty>(_Param);
5619 _M_unitTask._SetTaskCreationCallstack(details::_get_internal_task_options(_TaskOptions)._M_hasPresetCreationCallstack ? details::_get_internal_task_options(_TaskOptions)._M_presetCreationCallstack : _CAPTURE_CALLSTACK());
5623 _TaskInitMaybeFunctor(_Param, details::_IsCallable<void>(_Param, 0, 0, 0));
5742 auto then(const _Function& _Func) const -> typename details::_ContinuationTypeTraits<_Function, void>::_TaskOfType
5777 auto then(const _Function& _Func, task_options _TaskOptions = task_options()) const -> typename details::_ContinuationTypeTraits<_Function, void>::_TaskOfType
5779 details::_get_internal_task_options(_TaskOptions)._set_creation_callstack(_CAPTURE_CALLSTACK());
5783 auto then(const _Function& _Func, Concurrency::cancellation_token _CancellationToken) const -> typename details::_ContinuationTypeTraits<_Function, void>::_TaskOfType
5816 auto then(const _Function& _Func, task_continuation_context _ContinuationContext) const -> typename details::_ContinuationTypeTraits<_Function, void>::_TaskOfType
5856 auto then(const _Function& _Func, Concurrency::cancellation_token _CancellationToken, task_continuation_context _ContinuationContext) const -> typename details::_ContinuationTypeTraits<_Function, void>::_TaskOfType
5859 details::_get_internal_task_options(_TaskOptions)._set_creation_callstack(_CAPTURE_CALLSTACK());
5863 auto then(const _Function& _Func, Concurrency::cancellation_token _CancellationToken, task_continuation_context _ContinuationContext) const -> typename details::_ContinuationTypeTraits<_Function, void>::_TaskOfType
5966 void _CreateImpl(Concurrency::details::_CancellationTokenState * _Ct, Concurrency::scheduler_ptr _Scheduler)
5971 void _CreateImpl(Concurrency::details::_CancellationTokenState * _Ct)
5980 const details::_Task_ptr<details::_Unit_type>::_Type & _GetImpl() const
5988 void _SetImpl(const details::_Task_ptr<details::_Unit_type>::_Type & _Impl)
5996 void _SetImpl(details::_Task_ptr<details::_Unit_type>::_Type && _Impl)
6013 void _SetTaskCreationCallstack(const details::_TaskCreationCallstack &_callstack)
6029 auto _Then(const _Function& _Func, Concurrency::details::_CancellationTokenState *_PTokenState,
6030 details::_TaskInliningMode _InliningMode = Concurrency::details::_ForceInline) const -> typename details::_ContinuationTypeTraits<_Function, void>::_TaskOfType
6038 auto _Then(const _Function& _Func, Concurrency::details::_CancellationTokenState *_PTokenState,
6039 bool _Aggregating, details::_TaskInliningMode _InliningMode = Concurrency::details::_ForceInline) const -> typename details::_ContinuationTypeTraits<_Function, void>::_TaskOfType
6061 _M_unitTask._TaskInitAsyncOp<details::_Unit_type>(Microsoft::WRL::Make<details::_IAsyncActionToAsyncOperationConverter>(_AsyncAction).Get());
6070 _M_unitTask._TaskInitAsyncOp<details::_Unit_type>(Microsoft::WRL::Make<details::_IAsyncActionWithProgressToAsyncOperationConverter<_P>>(_AsyncActionWithProgress).Get());
6091 task<details::_Unit_type> _M_unitTask;
6094 namespace details
6179 auto create_task(_Ty _Param, task_options _TaskOptions = task_options()) -> task<typename details::_TaskTypeFromParam<_ReturnType, _Ty>::_Type>
6181 auto create_task(_Ty _Param) -> task<typename details::_TaskTypeFromParam<_ReturnType, _Ty>::_Type>
6184 static_assert(!std::is_same<typename details::_TaskTypeFromParam<_ReturnType, _Ty>::_Type, details::_BadArgType>::value,
6188 details::_get_internal_task_options(_TaskOptions)._set_creation_callstack(_CAPTURE_CALLSTACK());
6189 task<typename details::_TaskTypeFromParam<_ReturnType, _Ty>::_Type> _CreatedTask(_Param, _TaskOptions);
6191 task<typename details::_TaskTypeFromParam<_ReturnType, _Ty>::_Type> _CreatedTask(_Param);
6242 auto create_task(_Ty _Param, Concurrency::cancellation_token _Token) -> task<typename details::_TaskTypeFromParam<_ReturnType, _Ty>::_Type>
6244 static_assert(!std::is_same<typename details::_TaskTypeFromParam<_ReturnType, _Ty>::_Type, details::_BadArgType>::value,
6247 task<typename details::_TaskTypeFromParam<_ReturnType, _Ty>::_Type> _CreatedTask(_Param, _Token);
6256 namespace details
6315 } // namespace details
6333 typedef std::shared_ptr<details::_ProgressDispatcherBase<_ProgressType>> _PtrType;
6353 details::_ProgressDispatcherBase<_ProgressType> *_PDispatcher = new details::_ProgressDispatcher<_ProgressType, _ClassPtrType>(_Ptr);
6360 progress_reporter(details::_ProgressReporterCtorArgType);
6365 namespace details
6503 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6511 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6519 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6527 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6565 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6573 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6581 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6589 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6626 Concurrency::details::_Context::_Oversubscribe(true);
6631 Concurrency::details::_Context::_Oversubscribe(false);
6640 struct _SelectorTaskGenerator<details::_TypeSelectorNoAsync, _ReturnType>
6650 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6652 Concurrency::details::_Task_generator_oversubscriber_t _Oversubscriber;
6665 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6667 Concurrency::details::_Task_generator_oversubscriber_t _Oversubscriber;
6679 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6681 Concurrency::details::_Task_generator_oversubscriber_t _Oversubscriber;
6693 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6695 Concurrency::details::_Task_generator_oversubscriber_t _Oversubscriber;
6750 struct _SelectorTaskGenerator<details::_TypeSelectorNoAsync, void>
6757 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6759 Concurrency::details::_Task_generator_oversubscriber_t _Oversubscriber;
6769 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6771 Concurrency::details::_Task_generator_oversubscriber_t _Oversubscriber;
6781 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6783 Concurrency::details::_Task_generator_oversubscriber_t _Oversubscriber;
6793 details::_get_internal_task_options(_taskOptinos)._set_creation_callstack(_callstack);
6795 Concurrency::details::_Task_generator_oversubscriber_t _Oversubscriber;
6843 struct _SelectorTaskGenerator<details::_TypeSelectorAsyncTask, _ReturnType>
6895 struct _SelectorTaskGenerator<details
7276 extern const __declspec(selectany) WCHAR RuntimeClass_Concurrency_winrt_details__AsyncInfoBase[] = L"Concurrency_winrt.details._AsyncInfoBase";
7296 _M_id = Concurrency::details::_GetNextAsyncId();
7298 _M_id = Concurrency::details::platform::GetNextAsyncId();
7950 } // namespace details
7994 details::_AsyncTaskGeneratorThunk<_Function>* create_async(const _Function& _Func)
7996 static_assert(std::is_same<decltype(details::_IsValidCreateAsync<_ReturnType>(_Func, 0, 0, 0, 0, 0, 0, 0, 0)), std::true_type>::value,
7999 Microsoft::WRL::ComPtr<details::_AsyncTaskGeneratorThunk<_Function>> _AsyncInfo = Microsoft::WRL::Make<details::_AsyncTaskGeneratorThunk<_Function>>(_Func, _CAPTURE_CALLSTACK());
8001 Microsoft::WRL::ComPtr<detailsdetails::_AsyncTaskGeneratorThunk<_Function>>(_Func);
8007 namespace details
8095 inline void _JoinAllTokens_Add(const Concurrency::cancellation_token_source& _MergedSrc, Concurrency::details::_CancellationTokenState *_PJoinedTokenState)
8097 if (_PJoinedTokenState != nullptr && _PJoinedTokenState != Concurrency::details::_CancellationTokenState::_None())
8113 if (Concurrency::details::atomic_increment(_PParam->_M_completeCount) == _PParam->_M_numTasks)
8137 if (Concurrency::details::atomic_increment(_PParam->_M_completeCount) == _PParam->_M_numTasks)
8153 static task<std::vector<_ElementType>> _Perform(Concurrency::details::_CancellationTokenState *_PTokenState, _Iterator _Begin, _Iterator _End)
8157 Concurrency::details::_CancellationTokenState *_PTokenState = _TaskOptions.has_cancellation_token() ? _TaskOptions.get_cancellation_token()._GetImplValue() : nullptr;
8193 details::_JoinAllTokens_Add(_MergedSource, _PTokenState);
8202 details::_JoinAllTokens_Add(_MergedSource, _PTask->_GetImpl()->_M_pTokenState);
8242 }, Concurrency::details::_CancellationTokenState::_None());
8244 }, Concurrency::details::_CancellationTokenState::_None(), false);
8261 static task<std::vector<_ElementType>> _Perform(Concurrency::details::_CancellationTokenState *_PTokenState, _Iterator _Begin, _Iterator _End)
8265 Concurrency::details::_CancellationTokenState *_PTokenState = _TaskOptions.has_cancellation_token() ? _TaskOptions.get_cancellation_token()._GetImplValue() : nullptr;
8307 details::_JoinAllTokens_Add(_MergedSource, _PTokenState);
8316 details::_JoinAllTokens_Add(_MergedSource, _PTask->_GetImpl()->_M_pTokenState);
8355 }, Concurrency::details::_CancellationTokenState::_None());
8357 }, Concurrency::details::_CancellationTokenState::_None(), false);
8374 static task<void> _Perform(Concurrency::details::_CancellationTokenState *_PTokenState, _Iterator _Begin, _Iterator _End)
8378 Concurrency::details::_CancellationTokenState *_PTokenState = _TaskOptions.has_cancellation_token() ? _TaskOptions.get_cancellation_token()._GetImplValue() : nullptr;
8402 details::_JoinAllTokens_Add(_MergedSource, _PTokenState);
8411 details::_JoinAllTokens_Add(_MergedSource, _PTask->_GetImpl()->_M_pTokenState);
8437 }, Concurrency::details::_CancellationTokenState::_None());
8439 }, Concurrency::details::_CancellationTokenState::_None(), false);
8550 } // namespace details
8578 -> decltype (details::_WhenAllImpl<typename std::iterator_traits<_Iterator>::value_type::result_type, _Iterator>::_Perform(nullptr, _Begin, _End))
8581 return details::_WhenAllImpl<_ElementType, _Iterator>::_Perform(nullptr, _Begin, _End);
8616 -> decltype (details::_WhenAllImpl<typename std::iterator_traits<_Iterator>::value_type::result_type, _Iterator>::_Perform(_TaskOptions, _Begin, _End))
8619 return details::_WhenAllImpl<_ElementType, _Iterator>::_Perform(_TaskOptions, _Begin, _End);
8623 -> decltype (details::_WhenAllImpl<typename std::iterator_traits<_Iterator>::value_type::result_type, _Iterator>::_Perform(_CancellationToken._GetImplValue(), _Begin, _End))
8626 return details::_WhenAllImpl<_ElementType, _Iterator>::_Perform(_CancellationToken._GetImplValue(), _Begin, _End);
8690 return details::_WhenAllVectorAndValue(_Lhs, _Rhs, true);
8721 return details::_WhenAllVectorAndValue(_Rhs, _Lhs, false);
8787 namespace details
8798 if (Concurrency::details::_CancellationTokenState::_IsValid(_M_exceptionRelatedToken))
8803 Concurrency::details::_CancellationTokenState* _M_exceptionRelatedToken;
8812 bool _IsTokenCancled = !_PParam->_M_fHasExplicitToken && _Task._GetImpl()->_M_pTokenState != Concurrency::details::_CancellationTokenState::_None() && _Task._GetImpl()->_M_pTokenState->_IsCanceled();
8817 if (Concurrency::details::atomic_increment(_PParam->_M_completeCount) == _PParam->_M_numTasks)
8836 if (_PParam->_M_exceptionRelatedToken != Concurrency::details::_CancellationTokenState::_None())
8844 if (Concurrency::details::atomic_increment(_PParam->_M_completeCount) == _PParam->_M_numTasks)
8857 details::_JoinAllTokens_Add(_PParam->_M_cancellationSource, _PParam->_M_exceptionRelatedToken);
8863 details::_JoinAllTokens_Add(_PParam->_M_cancellationSource, _Task._GetImpl()->_M_pTokenState);
8880 static task<std::pair<_ElementType, size_t>> _Perform(Concurrency::details::_CancellationTokenState *_PTokenState, _Iterator _Begin, _Iterator _End)
8888 Concurrency::details::_CancellationTokenState *_PTokenState = _TaskOptions.has_cancellation_token() ? _TaskOptions.get_cancellation_token()._GetImplValue() : nullptr;
8890 auto _PParam = new _RunAnyParam<std::pair<std::pair<_ElementType, size_t>, Concurrency::details::_CancellationTokenState *>>();
8894 details::_JoinAllTokens_Add(_PParam->_M_cancellationSource, _PTokenState);
8900 task<std::pair<std::pair<_ElementType, size_t>, Concurrency::details::_CancellationTokenState *>> _Any_tasks_completed(_PParam->_M_Completed, _Options);
8902 task<std::pair<std::pair<_ElementType, size_t>, Concurrency::details::_CancellationTokenState *>> _Any_tasks_completed(_PParam->_M_Completed, _PParam->_M_cancellationSource.get_token());
8932 }, Concurrency::details::_CancellationTokenState::_None());
8934 }, Concurrency::details::_CancellationTokenState::_None(), false);
8940 return _Any_tasks_completed._Then([=](std::pair<std::pair<_ElementType, size_t>, Concurrency::details::_CancellationTokenState *> _Result, std::pair<_ElementType, size_t>* retVal) -> HRESULT {
8944 details::_JoinAllTokens_Add(_CancellationSource, _Result.second);
8962 static task<size_t> _Perform(Concurrency::details::_CancellationTokenState *_PTokenState, _Iterator _Begin, _Iterator _End)
8970 Concurrency::details::_CancellationTokenState *_PTokenState = _TaskOptions.has_cancellation_token() ? _TaskOptions.get_cancellation_token()._GetImplValue() : nullptr;
8972 auto _PParam = new _RunAnyParam<std::pair<size_t, Concurrency::details::_CancellationTokenState *>>();
8976 details::_JoinAllTokens_Add(_PParam->_M_cancellationSource, _PTokenState);
8985 task<std::pair<size_t, Concurrency::details::_CancellationTokenState *>> _Any_tasks_completed(_PParam->_M_Completed, _PParam->_M_cancellationSource.get_token());
9014 }, Concurrency::details::_CancellationTokenState::_None());
9016 }, Concurrency::details::_CancellationTokenState::_None(), false);
9023 return _Any_tasks_completed._Then([=](std::pair<size_t, Concurrency::details::_CancellationTokenState *> _Result, size_t* retVal) -> HRESULT {
9027 details::_JoinAllTokens_Add(_CancellationSource, _Result.second);
9038 } // namespace details
9063 -> decltype (details::_WhenAnyImpl<typename std::iterator_traits<_Iterator>::value_type::result_type, _Iterator>::_Perform(_TaskOptions, _Begin, _End))
9066 return details::_WhenAnyImpl<_ElementType, _Iterator>::_Perform(_TaskOptions, _Begin, _End);
9070 -> decltype (details::_WhenAnyImpl<typename std::iterator_traits<_Iterator>::value_type::result_type, _Iterator>::_Perform(nullptr, _Begin, _End))
9073 return details::_WhenAnyImpl<_ElementType, _Iterator>::_Perform(nullptr, _Begin, _End);
9103 -> decltype (details::_WhenAnyImpl<typename std::iterator_traits<_Iterator>::value_type::result_type, _Iterator>::_Perform(_CancellationToken._GetImplValue(), _Begin, _End))
9106 return details::_WhenAnyImpl<_ElementType, _Iterator>::_Perform(_CancellationToken._GetImplValue(), _Begin, _End);
9139 auto _PParam = new details::_RunAnyParam<std::pair<_ReturnType, size_t>>();
9146 details::_JoinAllTokens_Add(_PParam->_M_cancellationSource, reinterpret_cast<Concurrency::details::_CancellationTokenState *>(_Ret.second));
9151 auto _PParam = new details::_RunAnyParam<std::pair<_ReturnType, Concurrency::details::_CancellationTokenState *>>();
9153 task<std::pair<_ReturnType, Concurrency::details::_CancellationTokenState *>> _Any_tasks_completed(_PParam->_M_Completed, _PParam->_M_cancellationSource.get_token());
9156 auto _ReturnTask = _Any_tasks_completed._Then([=](std::pair<_ReturnType, Concurrency::details::_CancellationTokenState *> _Ret, _ReturnType* retVal) -> HRESULT {
9158 details::_JoinAllTokens_Add(_PParam->_M_cancellationSource, _Ret.second);
9186 _Lhs._Then(_Continuation, Concurrency::details::_CancellationTokenState::_None());
9187 _Rhs._Then(_Continuation, Concurrency::details::_CancellationTokenState::_None());
9189 _Lhs._Then(_Continuation, Concurrency::details::_CancellationTokenState::_None(), false);
9190 _Rhs._Then(_Continuation, Concurrency::details::_CancellationTokenState::_None(), false);
9224 auto _PParam = new details::_RunAnyParam<std::pair<std::vector<_ReturnType>, Concurrency::details::_CancellationTokenState *>>();
9226 task<std::pair<std::vector<_ReturnType>, Concurrency::details::_CancellationTokenState *>> _Any_tasks_completed(_PParam->_M_Completed, _PParam->_M_cancellationSource.get_token());
9232 auto _ReturnTask = _Any_tasks_completed._Then([=](std::pair<std::vector<_ReturnType>, Concurrency::details::_CancellationTokenState *> _Ret, std::vector<_ReturnType>* retVal) -> HRESULT {
9234 details::_JoinAllTokens_Add(_PParam->_M_cancellationSource, _Ret.second);
9262 }, Concurrency::details::_CancellationTokenState::_None());
9264 }, Concurrency::details::_CancellationTokenState::_None(), false);
9290 }, Concurrency::details::_CancellationTokenState::_None());
9292 }, Concurrency::details::_CancellationTokenState::_None(), false);
9357 auto _PParam = new details::_RunAnyParam<std::pair<details::_Unit_type, Concurrency::details::_CancellationTokenState *>>();
9359 task<std::pair<details::_Unit_type, Concurrency::details::_CancellationTokenState *>> _Any_task_completed(_PParam->_M_Completed, _PParam->_M_cancellationSource.get_token());
9362 auto _ReturnTask = _Any_task_completed._Then([=](std::pair<details::_Unit_type, Concurrency::details::_CancellationTokenState *> _Ret) -> HRESULT {
9364 details::_JoinAllTokens_Add(_PParam->_M_cancellationSource, _Ret.second);
9382 _PParam1->_M_Completed.set(std::make_pair(details::_Unit_type(), _ResultTask._GetImpl()->_M_pTokenState));
9389 _Lhs._Then(_Continuation, Concurrency::details::_CancellationTokenState::_None());
9390 _Rhs._Then(_Continuation, Concurrency::details::_CancellationTokenState::_None());
9392 _Lhs._Then(_Continuation, Concurrency::details::_CancellationTokenState::_None(), false);
9393 _Rhs._Then(_Continuation, Concurrency::details::_CancellationTokenState::_None(), false);
9432 namespace details
9454 } // namespace details