#include <thread.hpp>
Public Member Functions | |
Mutex () | |
Default constructor. | |
~Mutex () | |
Default destructor - call only when mutex is unlocked! | |
Static Public Member Functions | |
static void | lock (Mutex &m) |
Lock a specific mutex - this blocks until the mutex is available. | |
static void | unlock (Mutex &m) |
unlock a specific mutex | |
Friends | |
class | Lock |
The two static methods provided are used to lock and unlock the mutex. Destroying this mutex while it is locked causes undefined behavior - you should never do this! See the man pages for pthread_mutex_unlock on Linux for more details.
Note: Class Mutex is unavailable when MYNAHSA_USE_BOOST is set as a compile time option.
Definition at line 54 of file thread.hpp.