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

Detailed Description

template<typename ValueType = size_t>
class foxxll::shared_state< ValueType >

Definition at line 24 of file shared_state.hpp.

+ Inheritance diagram for shared_state< ValueType >:

#include <shared_state.hpp>

Public Member Functions

 shared_state (const value_type &s)
 
 shared_state (const shared_state &)=delete
 non-copyable: delete copy-constructor More...
 
value_type operator() ()
 
shared_stateoperator= (const shared_state &)=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 shared_state More...
 

Member Typedef Documentation

using value_type = ValueType
private

Definition at line 26 of file shared_state.hpp.

Constructor & Destructor Documentation

shared_state ( const value_type s)
inlineexplicit

Definition at line 38 of file shared_state.hpp.

shared_state ( const shared_state< ValueType > &  )
delete

non-copyable: delete copy-constructor

Member Function Documentation

value_type operator() ( )
inline

Definition at line 61 of file shared_state.hpp.

shared_state& operator= ( const shared_state< ValueType > &  )
delete

non-copyable: delete assignment operator

void wait_for ( const value_type needed_state)
inline

Definition at line 54 of file shared_state.hpp.

Referenced by request_with_state::wait().

Member Data Documentation

std::condition_variable cv_
private

condition variable

Definition at line 32 of file shared_state.hpp.

Referenced by shared_state< request_state >::set_to(), and shared_state< request_state >::wait_for().

std::mutex mutex_
private

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