STXXL
1.4.0
|
Definition at line 29 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 42 of file onoff_switch.h.
|
inline |
return true if switch is ON
Definition at line 76 of file onoff_switch.h.
|
inline |
turn switch OFF and notify one waiter
Definition at line 54 of file onoff_switch.h.
References stxxl::scoped_mutex_lock::unlock().
|
inline |
turn switch ON and notify one waiter
Definition at line 46 of file onoff_switch.h.
References stxxl::scoped_mutex_lock::unlock().
|
inline |
wait for switch to turn OFF
Definition at line 69 of file onoff_switch.h.
|
inline |
wait for switch to turn ON
Definition at line 62 of file onoff_switch.h.
Referenced by stxxl::wait_any().
|
private |
condition variable
Definition at line 35 of file onoff_switch.h.
|
private |
mutex for condition variable
Definition at line 32 of file onoff_switch.h.
|
private |
the switch's state
Definition at line 38 of file onoff_switch.h.