RTOS Wrapper
API reference
Loading...
Searching...
No Matches
Classes
MutexGuard.h File Reference

MutexGuard class definition. More...

#include "Mutex.h"
#include "variant"

Go to the source code of this file.

Classes

class  MutexGuard
 

Detailed Description

MutexGuard class definition.

The MutexGuard class provides an RAII-style mechanism for owning a mutex for the duration of a scoped block. When a MutexGuard object is created, it attempts to take ownership of the mutex. When the object is destroyed, it releases the ownership of the mutex.

Example:

{
MutexGuard lock(&myMutex);
// critical section
}
// mutex is released here
Definition MutexGuard.h:29
Todo:
Add

The MutexGuard class provides an RAII-style mechanism for owning a mutex for the duration of a scoped block. When a MutexGuard object is created, it attempts to take ownership of the mutex. When the object is destroyed, it releases the ownership of the mutex.

Example:

{
MutexGuard lock(&myMutex);
// critical section
}
// mutex is released here
Todo:
Add