STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
promise< _Ty & > Class Template Reference

Public Member Functions

 promise ()
 
template<class _Alloc >
 promise (allocator_arg_t, const _Alloc &_Al)
 
 promise (promise &&_Other) _NOEXCEPT
 
promiseoperator= (promise &&_Other) _NOEXCEPT
 
 ~promise () _NOEXCEPT
 
void swap (promise &_Other) _NOEXCEPT
 
future< _Ty & > get_future ()
 
void set_value (_Ty &_Val)
 
void set_value_at_thread_exit (_Ty &_Val)
 
void set_exception (_XSTD exception_ptr _Exc)
 
void set_exception_at_thread_exit (_XSTD exception_ptr _Exc)
 
 promise (const promise &)=delete
 
promiseoperator= (const promise &)=delete
 

Private Attributes

_Promise< _Ty * > _MyPromise
 

Constructor & Destructor Documentation

template<class _Ty >
promise< _Ty & >::promise ( )
inline
1578  { // construct
1579  }
_Promise< _Ty * > _MyPromise
Definition: future:1643
template<class _Ty >
template<class _Alloc >
promise< _Ty & >::promise ( allocator_arg_t  ,
const _Alloc &  _Al 
)
inline
1583  : _MyPromise(_Make_associated_state<_Ty *>(_Al))
1584  { // construct with allocator
1585  }
_Promise< _Ty * > _MyPromise
Definition: future:1643
template<class _Ty >
promise< _Ty & >::promise ( promise< _Ty & > &&  _Other)
inline
1589  { // construct from rvalue promise object
1590  }
_Promise< _Ty * > _MyPromise
Definition: future:1643
_Promise< _Ty > _MyPromise
Definition: future:1569
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1273
template<class _Ty >
promise< _Ty & >::~promise ( )
inline
1599  { // destroy
1601  { // exception if destroyed before function object returns
1604  ._Set_exception(_XSTD make_exception_ptr(_Fut), false);
1605  }
1606  }
bool _Is_valid() const _NOEXCEPT
Definition: future:1467
_Promise< _Ty * > _MyPromise
Definition: future:1643
error_code make_error_code(_Future_errc _Errno) _NOEXCEPT
Definition: future:120
#define _XSTD
Definition: xstddef:21
bool _Is_ready() const
Definition: future:1472
Definition: future:152
exception_ptr make_exception_ptr(_Ex _Except) _NOEXCEPT
Definition: exception:371
void _Set_exception(_XSTD exception_ptr _Exc, bool _Defer)
Definition: future:1049
const _State_manager< _Ty > & _Get_state() const
Definition: future:1436
template<class _Ty >
promise< _Ty & >::promise ( const promise< _Ty & > &  )
delete

Member Function Documentation

template<class _Ty >
future<_Ty&> promise< _Ty & >::get_future ( )
inline
1614  { // return a future object that shares the associated
1615  // asynchronous state
1617  }
_Promise< _Ty * > _MyPromise
Definition: future:1643
Definition: future:1157
Definition: xtr1common:15
_State_manager< _Ty > & _Get_state_for_future()
Definition: future:1454
template<class _Ty >
promise& promise< _Ty & >::operator= ( promise< _Ty & > &&  _Other)
inline
1593  { // assign from rvalue promise object
1594  _MyPromise = _STD forward<_Promise<_Ty *> >(_Other._MyPromise);
1595  return (*this);
1596  }
_Promise< _Ty * > _MyPromise
Definition: future:1643
_Promise< _Ty > _MyPromise
Definition: future:1569
template<class _Ty >
promise& promise< _Ty & >::operator= ( const promise< _Ty & > &  )
delete
template<class _Ty >
void promise< _Ty & >::set_exception ( _XSTD exception_ptr  _Exc)
inline
1630  { // store result
1632  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1445
_Promise< _Ty * > _MyPromise
Definition: future:1643
void _Set_exception(_XSTD exception_ptr _Exc, bool _Defer)
Definition: future:1049
template<class _Ty >
void promise< _Ty & >::set_exception_at_thread_exit ( _XSTD exception_ptr  _Exc)
inline
1635  { // store result and block until thread exit
1637  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1445
_Promise< _Ty * > _MyPromise
Definition: future:1643
void _Set_exception(_XSTD exception_ptr _Exc, bool _Defer)
Definition: future:1049
template<class _Ty >
void promise< _Ty & >::set_value ( _Ty &  _Val)
inline
1620  { // store result
1622  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1445
_Promise< _Ty * > _MyPromise
Definition: future:1643
_In_ int _Val
Definition: vcruntime_string.h:62
void _Set_value(const _Ty &_Val, bool _Defer)
Definition: future:1027
template<class _Ty >
void promise< _Ty & >::set_value_at_thread_exit ( _Ty &  _Val)
inline
1625  { // store result and block until thread exit
1627  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1445
_Promise< _Ty * > _MyPromise
Definition: future:1643
_In_ int _Val
Definition: vcruntime_string.h:62
void _Set_value(const _Ty &_Val, bool _Defer)
Definition: future:1027
template<class _Ty >
void promise< _Ty & >::swap ( promise< _Ty & > &  _Other)
inline
1609  { // exchange with _Other
1610  _MyPromise._Swap(_Other._MyPromise);
1611  }
_Promise< _Ty * > _MyPromise
Definition: future:1643
void _Swap(_Promise &_Other)
Definition: future:1430
_Promise< _Ty > _MyPromise
Definition: future:1569

Member Data Documentation

template<class _Ty >
_Promise<_Ty *> promise< _Ty & >::_MyPromise
private

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