Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MynahSA::Mutex Class Reference

#include <thread.hpp>

List of all members.

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


Detailed Description

Class Mutex implements mutual exclusion using the Posix pthread library or using Win32's mutex facilities.

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.


The documentation for this class was generated from the following file: