NCBI C++ ToolKit
|
Search Toolkit Book for CFastMutex
#include <corelib/ncbimtx.hpp>
Public Types | |
typedef CFastMutexGuard | TReadLockGuard |
Define Read Lock Guard. More... | |
typedef CFastMutexGuard | TWriteLockGuard |
Define Write Lock Guard. More... | |
Public Member Functions | |
CFastMutex (void) | |
Constructor. More... | |
~CFastMutex (void) | |
Destructor. More... | |
void | Lock (void) |
Acquire mutex for the current thread with no nesting checks. More... | |
void | Unlock (void) |
Release mutex with no owner or nesting checks. More... | |
bool | TryLock (void) |
Try locking the mutex. More... | |
operator SSystemFastMutex & (void) | |
Get SSystemFastMutex. More... | |
Private Member Functions | |
TSystemMutex * | GetHandle (void) |
Get handle - Unix version. More... | |
CFastMutex (const CFastMutex &) | |
Private copy constructor to disallow initialization. More... | |
CFastMutex & | operator= (const CFastMutex &) |
Private assignment operator to disallow assignment. More... | |
Private Attributes | |
SSystemFastMutex | m_Mutex |
Platform-dependent mutex handle, also used by CRWLock. More... | |
Friends | |
class | CRWLock |
CFastMutex –.
Simple mutex with fast lock/unlock functions.
This mutex can be used instead of CMutex if it's guaranteed that there is no nesting. This mutex does not check nesting or owner. It has better performance than CMutex, but is less secure.
Definition at line 666 of file ncbimtx.hpp.