PixelLightAPI
.
|
Mutex guard class ("Scoped Locking"-idiom, also known as "synchronized block") More...
#include <MutexGuard.h>
Public Member Functions | |
MutexGuard (Mutex &cMutex) | |
Constructor. | |
MutexGuard (Mutex &cMutex, uint64 nTimeout) | |
Constructor. | |
~MutexGuard () | |
Destructor. | |
bool | IsLocked () const |
Returns whether the used mutex was locked successfully. | |
Mutex & | GetMutex () const |
Returns the used mutex. |
Mutex guard class ("Scoped Locking"-idiom, also known as "synchronized block")
PLCore::MutexGuard::MutexGuard | ( | Mutex & | cMutex | ) | [inline] |
[in] | cMutex | Mutex to use, just referenced, must stay valid as long as this mutex guard exists! |
PLCore::MutexGuard::MutexGuard | ( | Mutex & | cMutex, |
uint64 | nTimeout | ||
) | [inline] |
[in] | cMutex | Mutex to use, just referenced, must stay valid as long as this mutex guard exists! |
[in] | nTimeout | Timeout in milliseconds |
PLCore::MutexGuard::~MutexGuard | ( | ) | [inline] |
Destructor.
bool PLCore::MutexGuard::IsLocked | ( | ) | const [inline] |
Returns whether the used mutex was locked successfully.
Mutex & PLCore::MutexGuard::GetMutex | ( | ) | const [inline] |
Returns the used mutex.
|