STXXL
1.4-dev
|
Definition at line 28 of file onoff_switch.h.
Public Member Functions | |
onoff_switch (bool flag=false) | |
construct switch More... | |
bool | is_on () |
return true if switch is ON More... | |
void | off () |
turn switch OFF and notify one waiter More... | |
void | on () |
turn switch ON and notify one waiter More... | |
void | wait_for_off () |
wait for switch to turn OFF More... | |
void | wait_for_on () |
wait for switch to turn ON More... | |
Private Attributes | |
condition_variable | m_cond |
condition variable More... | |
mutex | m_mutex |
mutex for condition variable More... | |
bool | m_on |
the switch's state More... | |
Additional Inherited Members | |
Private Member Functions inherited from stxxl::noncopyable | |
noncopyable () | |
|
inline |
construct switch
Definition at line 41 of file onoff_switch.h.
|
inline |
return true if switch is ON
Definition at line 75 of file onoff_switch.h.
|
inline |
turn switch OFF and notify one waiter
Definition at line 53 of file onoff_switch.h.
References stxxl::scoped_mutex_lock::unlock().
|
inline |
turn switch ON and notify one waiter
Definition at line 45 of file onoff_switch.h.
References stxxl::scoped_mutex_lock::unlock().
|
inline |
wait for switch to turn OFF
Definition at line 68 of file onoff_switch.h.
|
inline |
wait for switch to turn ON
Definition at line 61 of file onoff_switch.h.
Referenced by stxxl::wait_any().
|
private |
condition variable
Definition at line 34 of file onoff_switch.h.
|
private |
mutex for condition variable
Definition at line 31 of file onoff_switch.h.
|
private |
the switch's state
Definition at line 37 of file onoff_switch.h.