#include <mcllib/MCInMutex.h>
Inheritance diagram for MCInMutex:
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 |
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.
|
Virtual destructor. Free up resources as necessary |
|
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. |
|
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. |