Mutex smart pointer. More...
#include <mutex.h>

Public Member Functions | |
| mutex_guard (mutex &) | |
| Constructor. | |
| virtual | ~mutex_guard () |
| Destructor. | |
Mutex smart pointer.
This is a special smart pointer that implements the mutex lock. On create, it enters the protected area and blocks other threads from parallel executing the code protected by this quard. On destroy (deleting object from the stack), the lock is released.
| dbp::mutex_guard::mutex_guard | ( | mutex & | ) |
Constructor.
Enter the protected area.
| virtual dbp::mutex_guard::~mutex_guard | ( | ) | [virtual] |
Destructor.
Leave the protected area.