MySQL++ Reference Manual

Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members File Members

# lockable.h File Reference

Declares interface that allows a class to declare itself as "lockable". More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces
namespace | mysqlpp

## Detailed Description

Declares interface that allows a class to declare itself as "lockable".

The meaning of a class being lockable is very much per-class specific in this version of MySQL++. In a future version, it will imply that operations that aren't normally thread-safe will use platform mutexes if MySQL++ is configured to support them. This is planned for a version beyond v2.0. (See the Wishlist for the plan.) In the meantime, do not depend on this mechanism for thread safety; you will have to serialize access to some resources yourself.

To effect this variability in what it means for an object to be "locked", Lockable is only an interface. It delegates the actual implementation to a subclass of the Lock interface, using the Bridge pattern. (See Gamma et al.)