Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members
EkMutex Class ReferenceA mutual exclusion lock for thread synchronization within a process.
More...
#include <EkMutex.h>
List of all members.
Public Methods |
| EkMutex (void) |
| This is the default constructor. More...
|
| ~EkMutex (void) |
| This is the destructor. More...
|
void | lock (void) |
| Use this to lock all other objects out of a section of code. More...
|
void | unlock (void) |
| Use this to unlock a section of code. More...
|
Detailed Description
A mutual exclusion lock for thread synchronization within a process.
Once a thread successfully calls lock( ), all threads which then call lock( ) are blocked until the thread which calls lock( ) calls unlock( ) (in some implementations, it may not matter which thread calls unlock, but you should assume that the thread which holds the lock is the only one who can call unlock( )). This object works well with the guard object in EkGuard.h.
Limitations: Currently, the only supported implementations are for Windows NT/95 (using Visual C++) and POSIX. For other platforms, the implementation of EkMutex is replaced by a stub, which does nothing.
Important Note: Under Windows, this header file does not compile standalone. One of the files "afxwin.h" or "windows.h" should be included before EkMutex.h in any compilation unit.
Constructor & Destructor Documentation
EkMutex::EkMutex |
( |
void |
|
) |
[inline] |
|
|
This is the default constructor.
|
EkMutex::~EkMutex |
( |
void |
|
) |
[inline] |
|
Member Function Documentation
void EkMutex::lock |
( |
void |
|
) |
[inline] |
|
|
Use this to lock all other objects out of a section of code.
|
void EkMutex::unlock |
( |
void |
|
) |
[inline] |
|
|
Use this to unlock a section of code.
|
The documentation for this class was generated from the following file:
|