Qore Programming Language Reference Manual 1.19.2
|
The abstract base class for locks that support the internal API for use with the Condition class. More...
#include <QC_AbstractSmartLock.dox.h>
Public Member Methods | |
constructor () | |
Throws an exception if called directly; this class can only be instantiated by builtin subclasses. More... | |
string | getName () |
Returns the name of the threading class directly inheriting this class. More... | |
bool | lockOwner () |
Returns True if the calling thread owns the lock, False if not. More... | |
int | lockTID () |
Returns the TID of the thread owning the lock or -1 if the lock is currently not acquired. More... | |
The abstract base class for locks that support the internal API for use with the Condition class.
This is an abstract class to be inherited by builtin classes that implement the internal Qore API that allows them to be used by the Condition class. Currently the RWLock and Mutex classes inherit this class.
This class cannot be instantiated directly and also cannot be directly inherited by user-defined classes.
Qore::Thread::AbstractSmartLock::constructor | ( | ) |
Throws an exception if called directly; this class can only be instantiated by builtin subclasses.
ABSTRACTSMARTLOCK-CONSTRUCTOR-ERROR | this exception is thrown if this class is constructed directly (also if directly inherited by user classes) |
string Qore::Thread::AbstractSmartLock::getName | ( | ) |
Returns the name of the threading class directly inheriting this class.
bool Qore::Thread::AbstractSmartLock::lockOwner | ( | ) |
int Qore::Thread::AbstractSmartLock::lockTID | ( | ) |
Returns the TID of the thread owning the lock or -1 if the lock is currently not acquired.
This method normally not useful in practice for anything except checking that the current thread owns the lock, in which case AbstractSmartLock::lockOwner() is better, because if the lock is not owned by the current thread the lock ownership can change at any time.