Wait flag synchronization primitive. Can be used to wait for a certain event to occur. More...
#include <mitsuba/core/lock.h>
Inheritance diagram for mitsuba::WaitFlag:Public Member Functions | |
| WaitFlag (bool flag=false) | |
| Create a new wait flag. More... | |
| const bool & | get () const |
| Return the current flag value. More... | |
| void | set (bool value) |
| Set the value of the flag. More... | |
| void | wait () |
| Wait for the flag to be set to true. More... | |
| bool | wait (int ms) |
| Temporarily wait for the flag to be set to true. More... | |
| virtual const Class * | getClass () const |
| Retrieve this object's class. More... | |
Public Member Functions inherited from Object | |
| Object () | |
| Construct a new object. More... | |
| int | getRefCount () const |
| Return the current reference count. More... | |
| void | incRef () const |
| Increase the reference count of the object by one. More... | |
| void | decRef (bool autoDeallocate=true) const |
| Decrease the reference count of the object and possibly deallocate it. More... | |
| virtual std::string | toString () const |
| Return a human-readable string representation of the object's contents. More... | |
Static Public Attributes | |
| static Class * | m_theClass |
Static Public Attributes inherited from Object | |
| static Class * | m_theClass |
| Pointer to the object's class descriptor. More... | |
Protected Member Functions | |
| virtual | ~WaitFlag () |
| Virtual destructor. More... | |
Protected Member Functions inherited from Object | |
| virtual | ~Object () |
| Virtual private deconstructor. (Will only be called by ref) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
| static void | staticInitialization () |
| Initializes the built-in reference count debugger (if enabled) More... | |
| static void | staticShutdown () |
| Free the memory taken by staticInitialization() More... | |
Wait flag synchronization primitive. Can be used to wait for a certain event to occur.
| mitsuba::WaitFlag::WaitFlag | ( | bool | flag = false | ) |
Create a new wait flag.
| flag | Initial state of the flag. If set to true, wait() will immediately return. |
|
protectedvirtual |
Virtual destructor.
| const bool& mitsuba::WaitFlag::get | ( | ) | const |
Return the current flag value.
|
virtual |
Retrieve this object's class.
Reimplemented from Object.
| void mitsuba::WaitFlag::set | ( | bool | value | ) |
Set the value of the flag.
| void mitsuba::WaitFlag::wait | ( | ) |
Wait for the flag to be set to true.
| bool mitsuba::WaitFlag::wait | ( | int | ms | ) |
Temporarily wait for the flag to be set to true.
Similar to wait(), but also uses a time value given in milliseconds. A return value of false signals that a timeout has occurred.
| ms | Maximum waiting time in milliseconds |
|
static |