Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SharedState< ValueType > Class Template Reference

Detailed Description

template<typename ValueType = size_t>
class thrill::common::SharedState< ValueType >

Definition at line 27 of file shared_state.hpp.

#include <shared_state.hpp>

Public Member Functions

 SharedState (const value_type &s)
 
 SharedState (const SharedState &)=delete
 non-copyable: delete copy-constructor More...
 
value_type operator() ()
 
SharedStateoperator= (const SharedState &)=delete
 non-copyable: delete assignment operator More...
 
void set_to (const value_type &new_state)
 
void wait_for (const value_type &needed_state)
 

Private Types

using value_type = ValueType
 

Private Attributes

std::condition_variable cv_
 condition variable More...
 
std::mutex mutex_
 mutex for condition variable More...
 
value_type state_
 current state More...
 

Member Typedef Documentation

using value_type = ValueType
private

Definition at line 29 of file shared_state.hpp.

Constructor & Destructor Documentation

SharedState ( const value_type s)
inlineexplicit

Definition at line 41 of file shared_state.hpp.

SharedState ( const SharedState< ValueType > &  )
delete

non-copyable: delete copy-constructor

Member Function Documentation

value_type operator() ( )
inline
SharedState& operator= ( const SharedState< ValueType > &  )
delete

non-copyable: delete assignment operator

void set_to ( const value_type new_state)
inline
void wait_for ( const value_type needed_state)
inline

Member Data Documentation

std::condition_variable cv_
private

condition variable

Definition at line 35 of file shared_state.hpp.

Referenced by SharedState< ValueType >::set_to(), and SharedState< ValueType >::wait_for().

std::mutex mutex_
private

mutex for condition variable

Definition at line 32 of file shared_state.hpp.

Referenced by SharedState< ValueType >::operator()(), SharedState< ValueType >::set_to(), and SharedState< ValueType >::wait_for().


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