List of all members.
Detailed Description
Event with a toggled signal state.
Definition at line 44 of file ThreadingUtils.
Constructor & Destructor Documentation
osgEarth::Threading::Event::Event |
( |
| ) |
[inline] |
osgEarth::Threading::Event::~Event |
( |
| ) |
[inline] |
Member Function Documentation
bool osgEarth::Threading::Event::isSet |
( |
| ) |
const [inline] |
void osgEarth::Threading::Event::reset |
( |
| ) |
[inline] |
Definition at line 83 of file ThreadingUtils.
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( _m );
_set = false;
}
void osgEarth::Threading::Event::set |
( |
| ) |
[inline] |
bool osgEarth::Threading::Event::wait |
( |
| ) |
[inline] |
Definition at line 55 of file ThreadingUtils.
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( _m );
return _set ? true : (_cond.wait( &_m ) == 0);
}
bool osgEarth::Threading::Event::waitAndReset |
( |
| ) |
[inline] |
waits on a signal, and then automatically resets it before returning.
Definition at line 61 of file ThreadingUtils.
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock( _m );
if ( _set ) {
_set = false;
return true;
}
else {
bool value = _cond.wait( &_m ) == 0;
_set = false;
return value;
}
}
Member Data Documentation
The documentation for this class was generated from the following file: