
Different DBTools.h++ classes provide different levels of multithread support. Application programs must ensure that DBTools.h++ classes are used appropriately, based on the safety level they provide. The multithread support levels available in DBTools.h++ are:
MT-safe level 2. This is the highest level of multithread support. When an object provides MT-safe level 2 support, application programs can share the object among threads without performing explicit locking around operations. MT-safe level 2 classes contain enough internal locking to maintain their own internal integrity and use appropriate multithread-safe system calls. RWDBDatabase is the only class in DBTools.h++ that provides MT-safe level 2 support.
MT-safe level 1. This is the medium level of multithread support. When an object provides MT-safe level 1 support, application programs can share the object among threads, but they need to perform explicit locking around operations.
Currently RWDBConnection is the only database-dependent class in DBTools.h++ that provides MT Safe level 1 support.
In addition to RWDBConnection, all the database-independent classes that abstract concepts such as SQL expressions, SQL datatypes, SQL phrases, and debugging classes can be used as MT-safe level 1 classes. A list of these classes appears in Table 11, and they are discussed in Section 9.5.
MT-safe level 0. This is the lowest level of multithread support. MT-safe level 0 classes cannot be shared among threads. All the classes in Tools.h++ and DBTools.h++ other than the ones shown in Table 11 should be considered MT-safe level 0 classes.
The DBTools.h++ classes that fall into each level are summarized below. Table 11 lists all MT-safe level 1 and level 2 classes. If a class does not appear there, you should assume that its multithreading support level is MT-safe level 0.
| MT-safe level | DBTools.h++ classes |
|
level 2 |
RWDBDatabase |
|
level 1 |
RWDBAssignment |
|
RWDBBlob | |
|
RWDBBoundExpr | |
|
RWDBCollectableExpr | |
|
RWDBColumn | |
|
RWDBConnection | |
|
RWDBCriterion | |
|
RWDBCritFormDefinition | |
|
RWDBCritFuncDef{n} | |
|
RWDBDateTime | |
|
RWDecimalPortable | |
|
RWDBDuration | |
|
RWDBExpr | |
|
RWDBExprFormDefinition | |
|
RWDBExprFuncDef{n} | |
|
RWDBForeignKey | |
|
RWDBForeignKeyList | |
|
RWDBJoinExpr | |
|
RWDBNullIndicator | |
|
RWDBPhraseBook | |
|
RWDBRow | |
|
RWDBSchema | |
|
RWDBStatus | |
|
RWDBTracer | |
|
RWDBValue | |
|
level 0 |
All classes not listed above. |
You will find the acquire() and release() functions normally associated with multithreading in the APIs of many MT-safe level 0 classes. Do not use these functions at this time because they slow down performance. We have included the acquire() and release() functions only for the purpose of making classes multithread-ready. These functions will be available if and when the class is promoted to MT-safe level 1. Release notes will provide information on classes that are promoted to a higher multithread-safety level.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.