STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Attributes | List of all members
_Task_async_state< _Rx, _Inline > Class Template Reference
Inheritance diagram for _Task_async_state< _Rx, _Inline >:
_Packaged_state< _Rx()>

Public Types

typedef _Packaged_state< _Rx()> _Mybase
 
typedef _Mybase::_State_type _State_type
 

Public Member Functions

template<class _Fty2 >
 _Task_async_state (_Fty2 &&_Fnarg)
 
virtual void _Wait ()
 
virtual _State_type_Get_value (bool _Get_only_once)
 

Private Attributes

::Concurrency::task< void_Task
 

Member Typedef Documentation

template<class _Rx , bool _Inline>
typedef _Packaged_state<_Rx()> _Task_async_state< _Rx, _Inline >::_Mybase
template<class _Rx , bool _Inline>
typedef _Mybase::_State_type _Task_async_state< _Rx, _Inline >::_State_type

Constructor & Destructor Documentation

template<class _Rx , bool _Inline>
template<class _Fty2 >
_Task_async_state< _Rx, _Inline >::_Task_async_state ( _Fty2 &&  _Fnarg)
inline
892  : _Mybase(_STD forward<_Fty2>(_Fnarg))
893  { // construct from rvalue function object
894  this->_Retain(); // to support fire-and-forget future
895  _Task = ::Concurrency::create_task([this]()
896  { // do it now
897  if (_Inline)
898  this->_Call_immediate();
899  else
900  { // turn on oversubscription for launch::async
902  this->_Call_immediate();
904  }
905  this->_Release();
906  });
907 
908  this->_Running = true;
909  }
::Concurrency::task< void > _Task
Definition: future:927
_Packaged_state< _Rx()> _Mybase
Definition: future:887
static _CRTIMP void __cdecl _Oversubscribe(bool _BeginOversubscription)

Member Function Documentation

template<class _Rx , bool _Inline>
virtual _State_type& _Task_async_state< _Rx, _Inline >::_Get_value ( bool  _Get_only_once)
inlinevirtual
920  { // return the stored result or throw stored exception
921  if (_Inline)
922  _Task.wait();
923  return (_Mybase::_Get_value(_Get_only_once));
924  }
::Concurrency::task< void > _Task
Definition: future:927
task_status wait() const
Waits for this task to reach a terminal state. It is possible for wait to execute the task inline...
Definition: ppltasks.h:4373
template<class _Rx , bool _Inline>
virtual void _Task_async_state< _Rx, _Inline >::_Wait ( )
inlinevirtual
912  { // wait for completion
913  if (_Inline)
914  _Task.wait();
915  else
916  _Mybase::_Wait();
917  }
::Concurrency::task< void > _Task
Definition: future:927
task_status wait() const
Waits for this task to reach a terminal state. It is possible for wait to execute the task inline...
Definition: ppltasks.h:4373

Member Data Documentation

template<class _Rx , bool _Inline>
::Concurrency::task<void> _Task_async_state< _Rx, _Inline >::_Task
private

The documentation for this class was generated from the following file: