Lucene++ - a full-featured, c++ search engine
API Documentation
Utility class to support locking via a mutex. More...
#include <Synchronize.h>
Public Member Functions | |
| Synchronize () | |
| virtual | ~Synchronize () |
| void | lock (int32_t timeout=0) |
| Lock mutex using an optional timeout. | |
| void | unlock () |
| Unlock mutex. | |
| int32_t | unlockAll () |
| Unlock all recursive mutex. | |
| bool | holdsLock () |
| Returns true if mutex is currently locked by current thread. | |
Static Public Member Functions | |
| static void | createSync (SynchronizePtr &sync) |
| create a new Synchronize instance atomically. | |
Protected Attributes | |
| boost::recursive_timed_mutex | mutexSynchronize |
| int64_t | lockThread |
| int32_t | recursionCount |
Utility class to support locking via a mutex.
| Lucene::Synchronize::Synchronize | ( | ) |
|
virtual |
|
static |
create a new Synchronize instance atomically.
| bool Lucene::Synchronize::holdsLock | ( | ) |
Returns true if mutex is currently locked by current thread.
| void Lucene::Synchronize::lock | ( | int32_t | timeout = 0 | ) |
Lock mutex using an optional timeout.
| void Lucene::Synchronize::unlock | ( | ) |
Unlock mutex.
| int32_t Lucene::Synchronize::unlockAll | ( | ) |
Unlock all recursive mutex.
|
protected |
|
protected |
|
protected |