|
latest version v1.9 - last update 10 Apr 2010 |
|
lti semaphore class for inter-thread (not inter-process!) synchronisation More...
#include <ltiSemaphore.h>


Public Member Functions | |
| semaphore (const int initialValue=1) | |
| virtual | ~semaphore () |
| bool | wait () |
| bool | tryWait () |
| bool | post () |
| int | getValue () |
| void | reset () |
| virtual const char * | getTypeName () const |
Protected Attributes | |
| HANDLE | theSemaphore |
lti semaphore class for inter-thread (not inter-process!) synchronisation
| lti::semaphore::semaphore | ( | const int | initialValue = 1 |
) |
default constructor
| virtual lti::semaphore::~semaphore | ( | ) | [virtual] |
destructor
| virtual const char* lti::semaphore::getTypeName | ( | ) | const [virtual] |
returns the name of this type
Reimplemented from lti::object.
| int lti::semaphore::getValue | ( | ) |
get current value
| bool lti::semaphore::post | ( | ) |
| void lti::semaphore::reset | ( | ) |
reset value to initialValue
| bool lti::semaphore::tryWait | ( | ) |
Try to wait on semaphore, but do not block.
| bool lti::semaphore::wait | ( | ) |
wait on semaphore, i.e.
decrease the value or wait if counter <= 0
HANDLE lti::semaphore::theSemaphore [protected] |