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
1566  { // construct
1567  }
_Promise< _Ty * > _MyPromise
Definition: future:1625
template<class _Ty >
template<class _Alloc >
promise< _Ty & >::promise ( allocator_arg_t  ,
const _Alloc &  _Al 
)
inline
1571  : _MyPromise(_Make_associated_state<_Ty *>(_Al))
1572  { // construct with allocator
1573  }
_Promise< _Ty * > _MyPromise
Definition: future:1625
template<class _Ty >
promise< _Ty & >::promise ( promise< _Ty & > &&  _Other)
inline
1576  : _MyPromise(_STD forward<_Promise<_Ty *> >(_Other._MyPromise))
1577  { // construct from rvalue promise object
1578  }
_Promise< _Ty * > _MyPromise
Definition: future:1625
_Promise< _Ty > _MyPromise
Definition: future:1553
template<class _Ty >
promise< _Ty & >::~promise ( )
inline
1587  { // destroy
1588  }
template<class _Ty >
promise< _Ty & >::promise ( const promise< _Ty & > &  )
delete

Member Function Documentation

template<class _Ty >
future<_Ty&> promise< _Ty & >::get_future ( )
inline
1596  { // return a future object that shares the associated
1597  // asynchronous state
1599  }
_Promise< _Ty * > _MyPromise
Definition: future:1625
Definition: future:1145
static _Nil _Nil_obj
Definition: xtr1common:29
_State_manager< _Ty > & _Get_state_for_future()
Definition: future:1442
template<class _Ty >
promise& promise< _Ty & >::operator= ( promise< _Ty & > &&  _Other)
inline
1581  { // assign from rvalue promise object
1582  _MyPromise = _STD forward<_Promise<_Ty *> >(_Other._MyPromise);
1583  return (*this);
1584  }
_Promise< _Ty * > _MyPromise
Definition: future:1625
_Promise< _Ty > _MyPromise
Definition: future:1553
template<class _Ty >
promise& promise< _Ty & >::operator= ( const promise< _Ty & > &  )
delete
template<class _Ty >
void promise< _Ty & >::set_exception ( _XSTD exception_ptr  _Exc)
inline
1612  { // store result
1614  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1433
_Promise< _Ty * > _MyPromise
Definition: future:1625
void _Set_exception(_XSTD exception_ptr _Exc, bool _Defer)
Definition: future:1037
template<class _Ty >
void promise< _Ty & >::set_exception_at_thread_exit ( _XSTD exception_ptr  _Exc)
inline
1617  { // store result and block until thread exit
1619  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1433
_Promise< _Ty * > _MyPromise
Definition: future:1625
void _Set_exception(_XSTD exception_ptr _Exc, bool _Defer)
Definition: future:1037
template<class _Ty >
void promise< _Ty & >::set_value ( _Ty &  _Val)
inline
1602  { // store result
1604  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1433
_Promise< _Ty * > _MyPromise
Definition: future:1625
void _Set_value(const _Ty &_Val, bool _Defer)
Definition: future:1021
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty >
void promise< _Ty & >::set_value_at_thread_exit ( _Ty &  _Val)
inline
1607  { // store result and block until thread exit
1609  }
_State_manager< _Ty > & _Get_state_for_set()
Definition: future:1433
_Promise< _Ty * > _MyPromise
Definition: future:1625
void _Set_value(const _Ty &_Val, bool _Defer)
Definition: future:1021
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty >
void promise< _Ty & >::swap ( promise< _Ty & > &  _Other)
inline
1591  { // exchange with _Other
1592  _MyPromise._Swap(_Other._MyPromise);
1593  }
_Promise< _Ty * > _MyPromise
Definition: future:1625
void _Swap(_Promise &_Other)
Definition: future:1418
_Promise< _Ty > _MyPromise
Definition: future:1553

Member Data Documentation

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

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