#include <ncbimtx.hpp>
Collaboration diagram for 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 633 of file ncbimtx.hpp.
Public Types | |
| typedef CFastMutexGuard | TReadLockGuard |
| Define Read Lock Guard. | |
| typedef CFastMutexGuard | TWriteLockGuard |
| Define Write Lock Guard. | |
Public Member Functions | |
| CFastMutex (void) | |
| Constructor. | |
| ~CFastMutex (void) | |
| Destructor. | |
| void | Lock (void) |
| Acquire mutex for the current thread with no nesting checks. | |
| void | Unlock (void) |
| Release mutex with no owner or nesting checks. | |
| bool | TryLock (void) |
| Try locking the mutex. | |
| operator SSystemFastMutex & (void) | |
| Get SSystemFastMutex. | |
Private Member Functions | |
| TSystemMutex * | GetHandle (void) |
| Get handle - Unix version. | |
| CFastMutex (const CFastMutex &) | |
| Private copy constructor to disallow initialization. | |
| CFastMutex & | operator= (const CFastMutex &) |
| Private assignment operator to disallow assignment. | |
Private Attributes | |
| SSystemFastMutex | m_Mutex |
| Platform-dependent mutex handle, also used by CRWLock. | |
Friends | |
| class | CRWLock |
|
|
Define Read Lock Guard.
Definition at line 647 of file ncbimtx.hpp. |
|
|
Define Write Lock Guard.
Definition at line 650 of file ncbimtx.hpp. |
|
|
Constructor. Creates mutex handle. |
|
|
Destructor. Close mutex handle. No checks if it's still acquired. |
|
|
Private copy constructor to disallow initialization.
|
|
|
Get handle - Unix version. Also used by CRWLock. Definition at line 669 of file ncbimtx.hpp. |
|
|
Acquire mutex for the current thread with no nesting checks.
Referenced by BlastLockHandler(), CWorkerNodeAffinityGuard::CWorkerNodeAffinityGuard(), CQueueGuard::Guard(), CBDB_Cache::Lock(), and CFastRWLock::WriteLock(). |
|
|
Get SSystemFastMutex.
|
|
|
Private assignment operator to disallow assignment.
|
|
|
Try locking the mutex.
|
|
|
Release mutex with no owner or nesting checks.
Referenced by BlastLockHandler(), CQueueGuard::Release(), CBDB_Cache::Unlock(), and CWorkerNodeAffinityGuard::~CWorkerNodeAffinityGuard(). |
|
|
Definition at line 677 of file ncbimtx.hpp. |
|
|
Platform-dependent mutex handle, also used by CRWLock.
Definition at line 680 of file ncbimtx.hpp. |
1.4.6
Modified on Mon Dec 07 16:23:05 2009 by modify_doxy.py rev. 173732