OpenDaVINCI  4.16.0
odcore::wrapper::MutexFactory Struct Reference

#include <MutexFactory.h>

Static Public Member Functions

static MutexcreateMutex ()
 

Detailed Description

Factory for creating wrapped mutexes (i.e. mutexes based on WIN32, pthread, ...).

It can be used as follows:

unique_ptr<Mutex> m = MutexFactory::createMutex();
...
if (m.get() != NULL) {
m->lock();
}
...
// Do some things in a critical section.
...
if (m.get() != NULL) {
m->unlock();
}

Member Function Documentation