NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
CFastMutex Class Reference

Search Toolkit Book for CFastMutex

CFastMutex –. More...

#include <corelib/ncbimtx.hpp>

+ Collaboration diagram for CFastMutex:

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

TSystemMutexGetHandle (void)
 Get handle - Unix version. More...
 
 CFastMutex (const CFastMutex &)
 Private copy constructor to disallow initialization. More...
 
CFastMutexoperator= (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
 

Detailed Description

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.


The documentation for this class was generated from the following file:
Modified on Sun Apr 14 05:25:57 2024 by modify_doxy.py rev. 669887