The UaMutex class provides access serialization between threads. The purpose of a UaMutex is to protect an object, data structure or section of code so that only one thread can access it at a time (this is similar to the Java synchronized keyword). It is usually best to use a mutex with a UaMutexLocker since this makes it easy to ensure that locking and unlocking are performed consistently. It is not possible to create plane copies of this Class. More...
#include <uamutex.h>
Public Member Functions | |
UaMutex () | |
~UaMutex () | |
void | lock () |
void | unlock () |
The UaMutex class provides access serialization between threads. The purpose of a UaMutex is to protect an object, data structure or section of code so that only one thread can access it at a time (this is similar to the Java synchronized keyword). It is usually best to use a mutex with a UaMutexLocker since this makes it easy to ensure that locking and unlocking are performed consistently. It is not possible to create plane copies of this Class.
UaMutex::UaMutex | ( | ) |
UaMutex::~UaMutex | ( | ) |
destruction Destroys the UaMutex object.
void UaMutex::lock | ( | ) |
Attempts to lock the mutex. This function will block the current thread if the mutex is already locked.
void UaMutex::unlock | ( | ) |
Unlocks the mutex.