![]()  | 
  
    Qore Programming Language 2.3.0
    
   | 
 
provides a mutually-exclusive thread lock More...
#include <QoreThreadLock.h>
Public Member Methods | |
| DLLLOCAL | QoreThreadLock () | 
| creates the lock  | |
| DLLLOCAL | QoreThreadLock (const pthread_mutexattr_t *ma) | 
| creates the lock with the given attributes  | |
| DLLLOCAL | QoreThreadLock (const QoreThreadLock &) | 
| creates a new object (not based on the original lock status)  | |
| DLLLOCAL | ~QoreThreadLock () | 
| destroys the lock  | |
| DLLLOCAL void | lock () | 
| grabs the lock (assumes that the lock is unlocked)   | |
| DLLLOCAL int | trylock () | 
| attempts to acquire the mutex and returns the status immediately; does not block   | |
| DLLLOCAL void | unlock () | 
| releases the lock (assumes that the lock is locked)   | |
Friends | |
| class | QoreCondition | 
provides a mutually-exclusive thread lock
This class is just a simple wrapper for pthread_mutex_t. It does not provide any special logic for checking for correct usage, etc.
      
  | 
  inline | 
grabs the lock (assumes that the lock is unlocked)
no error checking happens here; if you grab the lock twice it will deadlock
Referenced by AutoLocker::AutoLocker(), AutoLocker::AutoLocker(), AutoLocker::AutoLocker(), AutoLocker::AutoLocker(), OptLocker::OptLocker(), SafeLocker::SafeLocker(), SafeLocker::SafeLocker(), AutoUnlocker::~AutoUnlocker(), SafeLocker::lock(), and SafeLocker::relock().
      
  | 
  inline | 
attempts to acquire the mutex and returns the status immediately; does not block
      
  | 
  inline | 
releases the lock (assumes that the lock is locked)
no error checking is implemented here
Referenced by AutoUnlocker::AutoUnlocker(), AutoUnlocker::AutoUnlocker(), AutoLocker::~AutoLocker(), OptLocker::~OptLocker(), SafeLocker::~SafeLocker(), and SafeLocker::unlock().