latest version v1.9 - last update 10 Apr 2010 |
#include <ltiMutex.h>
Public Member Functions | |
mutex () | |
virtual | ~mutex () |
void | lock () |
bool | tryLock () |
void | unlock () |
virtual const char * | getTypeName () const |
Protected Attributes | |
HANDLE | theMutex |
This object can be used to protect critical sections on multithreaded applications. The same thread should NOT try to lock the mutex more than once. The behavior of this will depend on the operating system: on linux/unix the thread will be locked forever (posix standard); on windows, the thread will count how many lock have been done, but it will not be blocked by the later locks!
lti::mutex::mutex | ( | ) |
default constructor
virtual lti::mutex::~mutex | ( | ) | [virtual] |
destructor
virtual const char* lti::mutex::getTypeName | ( | ) | const [virtual] |
returns the name of this type
Reimplemented from lti::object.
void lti::mutex::lock | ( | ) |
wait until lock for mutex becomes available and lock it
Referenced by lti::lapackInterface::lockInterface().
bool lti::mutex::tryLock | ( | ) |
Try to lock mutex, but do not block.
void lti::mutex::unlock | ( | ) |
unlock mutex
Referenced by lti::lapackInterface::unlockInterface().
HANDLE lti::mutex::theMutex [protected] |
the WIN32 mutex objects