smart_mutex.h File Reference

#include "common/common.h"
#include <pthread.h>
Include dependency graph for smart_mutex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  smart_mutex
 class that automatically creates and destroys pthread mutexes More...
class  mlock
 class that automatically locks and unlocks pthread mutexes To use mlocks in code:

  • create a mutex (or smart_mutex) that will be locked
  • create an mlock object and pass the mutex in the constructor
  • on destruction, the mlock will automatically unlock the mutex