Xmipp
v3.23.11-Nereus
|
#include <xmipp_threads.h>
Public Member Functions | |
Mutex () | |
virtual | ~Mutex () |
virtual void | lock () |
virtual void | unlock () |
Friends | |
class | Condition |
Class wrapping around the pthreads mutex. This class will provide a more object oriented implementation of a mutex, to ensure the unique access to critical regions of code and other synchronization problems.
Definition at line 52 of file xmipp_threads.h.
Mutex::Mutex | ( | ) |
Default constructor. This constructor just initialize the pthread_mutex_t structure with its defaults values, just like static initialization with PTHREAD_MUTEX_INITIALIZER
Definition at line 36 of file xmipp_threads.cpp.
|
virtual |
Destructor.
Definition at line 41 of file xmipp_threads.cpp.
|
virtual |
Function to get the access to the mutex. If the some thread has the mutex and other ask to lock will be waiting until the first one release the mutex
Reimplemented in MpiFileMutex.
Definition at line 46 of file xmipp_threads.cpp.
|
virtual |
Function to release the mutex. This allow the access to the mutex to other threads that are waiting for it.
Reimplemented in MpiFileMutex.
Definition at line 51 of file xmipp_threads.cpp.
|
friend |
Definition at line 80 of file xmipp_threads.h.