15 #ifndef STXXL_COMMON_STATE_HEADER
16 #define STXXL_COMMON_STATE_HEADER
25 template <
typename ValueType =
int>
55 while (needed_state != m_state)
68 #endif // !STXXL_COMMON_STATE_HEADER
state(const value_type &s)
void set_to(const value_type &new_state)
void unlock()
unlock mutex hold prematurely
value_type m_state
current state
Aquire a lock that's valid until the end of scope.
#define STXXL_BEGIN_NAMESPACE
void wait_for(const value_type &needed_state)
mutex m_mutex
mutex for condition variable
#define STXXL_END_NAMESPACE
condition_variable m_cond
condition variable