Devel Lib
Devel::Threading::CLockGuard Class Reference

A lock guard class for a recursive mutex. More...

#include <LockGuard.h>

Public Member Functions

 CLockGuard (const CMutex &i_oMutex)
 Constructs a CLockGuard and acquires the lock on the specified mutex. More...
 
 ~CLockGuard ()
 Destroys the CLockGuard and releases the lock on the mutex.
 

Detailed Description

A lock guard class for a recursive mutex.

This class provides a convenient way to acquire and release a lock on a recursive mutex.

Example usage:

CMutex mutex;
{
RecursiveLockGuard(mutex); // Acquires the lock on the mutex
// Critical section
// The lock will be automatically released when the lock guard goes out of scope
}

Constructor & Destructor Documentation

◆ CLockGuard()

Devel::Threading::CLockGuard::CLockGuard ( const CMutex i_oMutex)
inline

Constructs a CLockGuard and acquires the lock on the specified mutex.

Parameters
i_oMutexThe recursive mutex to lock.

The documentation for this class was generated from the following file: