STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
stdext::threads::condition Class Reference

Public Member Functions

 condition ()
 
 ~condition () _NOEXCEPT
 
void notify_one ()
 
void notify_all ()
 
template<class _Scopedlock >
void wait (_Scopedlock &_Lock)
 
template<class _Scopedlock , class _Predicate >
void wait (_Scopedlock &_Lock, _Predicate _Pred)
 
template<class _Scopedlock >
bool timed_wait (_Scopedlock &_Lock, const xtime &_Xt)
 
template<class _Scopedlock , class _Predicate >
bool timed_wait (_Scopedlock &_Lock, const xtime &_Xt, _Predicate _Pred)
 
template<class _Scopedlock >
void _Register (_Scopedlock &_Lck)
 

Private Member Functions

 condition (const condition &)
 
conditionoperator= (const condition &)
 

Private Attributes

_Cnd_t _Cond
 

Constructor & Destructor Documentation

stdext::threads::condition::condition ( )
inline
24  { // construct
26  }
int _Validate(int _Res)
Definition: exceptions:45
_CRTIMP2_PURE int __cdecl _Cnd_init(_Cnd_t *)
_Cnd_t _Cond
Definition: condition:91
stdext::threads::condition::~condition ( )
inline
29  { // destroy
31  }
_Cnd_t _Cond
Definition: condition:91
_CRTIMP2_PURE void __cdecl _Cnd_destroy(_Cnd_t *)
stdext::threads::condition::condition ( const condition )
private

Member Function Documentation

template<class _Scopedlock >
void stdext::threads::condition::_Register ( _Scopedlock &  _Lck)
inline
86  { // register *this for notify_all at thread exit
87  _Cnd_register_at_thread_exit(&_Cond, &_Lck._My_lock._Mtx._Mtx, 0);
88  }
_CRTIMP2_PURE int __cdecl _Cnd_register_at_thread_exit(_Cnd_t *, _Mtx_t *, int *)
_Cnd_t _Cond
Definition: condition:91
void stdext::threads::condition::notify_all ( )
inline
39  { // release all blocked threads
41  }
int _Validate(int _Res)
Definition: exceptions:45
_CRTIMP2_PURE int __cdecl _Cnd_broadcast(_Cnd_t *)
_Cnd_t _Cond
Definition: condition:91
void stdext::threads::condition::notify_one ( )
inline
34  { // release up to one blocked thread
36  }
int _Validate(int _Res)
Definition: exceptions:45
_CRTIMP2_PURE int __cdecl _Cnd_signal(_Cnd_t *)
_Cnd_t _Cond
Definition: condition:91
condition& stdext::threads::condition::operator= ( const condition )
private
template<class _Scopedlock >
bool stdext::threads::condition::timed_wait ( _Scopedlock &  _Lock,
const xtime _Xt 
)
inline
63  { // block until signalled, or until time _Xt
64  if (!_Lock)
67  &_Lock._My_lock._Mtx._Mtx, &_Xt)) == thrd_success);
68  }
int _Validate(int _Res)
Definition: exceptions:45
Definition: threads.h:15
_CRTIMP2_PURE int __cdecl _Cnd_timedwait(_Cnd_t *, _Mtx_t *, const xtime *)
_Cnd_t _Cond
Definition: condition:91
_CRTIMP2_PURE void __cdecl _Throw_lock_error()
template<class _Scopedlock , class _Predicate >
bool stdext::threads::condition::timed_wait ( _Scopedlock &  _Lock,
const xtime _Xt,
_Predicate  _Pred 
)
inline
74  { // block until signalled and _Pred is true, or until time _Xt
75  if (!_Lock)
77  int _Res = thrd_success;
78  while (!_Pred() && _Res == thrd_success)
80  &_Lock._My_lock._Mtx._Mtx, &_Xt));
81  return (_Res == thrd_success);
82  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
int _Validate(int _Res)
Definition: exceptions:45
Definition: threads.h:15
_CRTIMP2_PURE int __cdecl _Cnd_timedwait(_Cnd_t *, _Mtx_t *, const xtime *)
_Cnd_t _Cond
Definition: condition:91
_CRTIMP2_PURE void __cdecl _Throw_lock_error()
template<class _Scopedlock >
void stdext::threads::condition::wait ( _Scopedlock &  _Lock)
inline
45  { // block until signalled
46  if (!_Lock)
48  _Validate(_Cnd_wait(&_Cond, &_Lock._My_lock._Mtx._Mtx));
49  }
_CRTIMP2_PURE int __cdecl _Cnd_wait(_Cnd_t *, _Mtx_t *)
int _Validate(int _Res)
Definition: exceptions:45
_Cnd_t _Cond
Definition: condition:91
_CRTIMP2_PURE void __cdecl _Throw_lock_error()
template<class _Scopedlock , class _Predicate >
void stdext::threads::condition::wait ( _Scopedlock &  _Lock,
_Predicate  _Pred 
)
inline
54  { // block until signalled and _Pred is true
55  if (!_Lock)
57  while (!_Pred())
58  _Validate(_Cnd_wait(&_Cond, &_Lock._My_lock._Mtx._Mtx));
59  }
_FwdIt const _Ty _Pr _Pred
Definition: algorithm:1985
_CRTIMP2_PURE int __cdecl _Cnd_wait(_Cnd_t *, _Mtx_t *)
int _Validate(int _Res)
Definition: exceptions:45
_Cnd_t _Cond
Definition: condition:91
_CRTIMP2_PURE void __cdecl _Throw_lock_error()

Member Data Documentation

_Cnd_t stdext::threads::condition::_Cond
private

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