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

MCInMutex Class Reference

Representation of an in-process mutex object. More...

#include <mcllib/MCInMutex.h>

Inheritance diagram for MCInMutex:

MCMutex MCNonCopy List of all members.

Public Member Functions

virtual void lock ()
 Lock the mutex object.
 MCInMutex ()
 Construct an in-process mutex.
virtual void unlock ()
 Unlock the mutex object.
virtual ~MCInMutex ()
 Virtual destructor.

Friends

class MCCondVar

Detailed Description

Representation of an in-process mutex object.

In-process mutex objects cannot be shared across process boundaries and are generally cheap or free in terms of operating system resources (i.e. they just use memory). However, use of mutex objects and locking can impact performance because locking is a relatively expensive operation.


Constructor & Destructor Documentation

virtual ~MCInMutex  )  [virtual]
 

Virtual destructor.

Free up resources as necessary


Member Function Documentation

virtual void lock  )  [virtual]
 

Lock the mutex object.

If another thread has locked the mutex object and has not yet unlocked it, the calling thread blocks indefinitely until the other thread calls unlock().

Implements MCMutex.

virtual void unlock  )  [virtual]
 

Unlock the mutex object.

If there are any threads blocked waiting for the mutex to be unlocked, one of them will be woken up.

Implements MCMutex.


Generated on Wed Jan 12 19:05:49 2005 for MCLLIB by  doxygen 1.3.9.1