Qore Programming Language  0.8.3
Public Member Functions | Protected Attributes
OptLocker Class Reference

provides a safe and exception-safe way to hold optional locks in Qore, only to be used on the stack, cannot be dynamically allocated More...

#include <QoreThreadLock.h>

List of all members.

Public Member Functions

DLLLOCAL OptLocker (QoreThreadLock *l)
 creates the object and grabs the lock if the argument is not NULL
DLLLOCAL ~OptLocker ()
 releases the lock if there is a lock pointer being managed and destroys the object

Protected Attributes

QoreThreadLocklck
 the pointer to the lock that will be managed

Detailed Description

provides a safe and exception-safe way to hold optional locks in Qore, only to be used on the stack, cannot be dynamically allocated

Ensures that locks are released by locking the lock when the object is created and releasing it when the object is destroyed.

See also:
SafeLocker
AutoLocker

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines