Threads.h++ 2.0 was a major release of the Threads.h++ product. This release included numerous internal improvements, as well as important changes to the public interface.
Changes to the public interface in version 2.0 include:
Several classes have been renamed from an RW to an RWT class name due to the templatization of the classes.
Several exception classes have been renamed in the Execution Tracing package.
A reorganization of the product into seven different packages, each of which builds its own library. Organizing the product into packages provides the dual benefits of structure and flexibility, making it easier to understand and use. Note that a library still exists with the same name as previous versions of Threads.h++. See Table 1 for a summary of the packages in version 2.0.
A sophisticated, event-based tracing facility. The Execution Tracing package makes debugging easier by generating a record of program execution. For more information, see Chapter 6, "The Execution Tracing Package."
Functor lists, which allow you to call more than one functor per invocation. For more information, see Section 8.6, "The Functor List Subpackage."
Functor maps, which allow key-based invocation of a functor when you have multiple functors to choose from. For more information, see Section 8.7, "The Functor Map Subpackage."
New and uncovered functionality in the Smart Pointer package. Table 16 includes new classes as well as some that were previously internal to Threads.h++. For more information on this package, see Chapter 7.
Name changes for header files, template classes, and macros. Old names still work, however.
The following tables list renamed classes for the Functor, Interthread Communication, Smart Pointer, Synchronization, Thread-compatible Exception, and Threading packages. For more information on the new class names, see the class descriptions in the Threads Module Reference Guide.
Table 8 lists the renamed classes in the Functor package.
Former Name | New Name |
RWFunctor1<S1> | |
RWFunctor1Imp<S1> | |
RWFunctor2<S1,S2> | |
RWFunctor2Imp<S1,S2> | |
RWFunctorR0<SR> | |
RWFunctorR0Imp<SR> | |
RWFunctorR1<SR,S1> | |
RWFunctorR1Imp<SR,S1> | |
RWFunctorR2<SR,S1,S2> | |
RWFunctorR2Imp<SR,S1,S2> |
Table 9 lists the renamed classes in the Interthread Communication package.
Former Name | New Name |
RWEscrowHandle<Redeemable> | |
RWEscrowImp<Redeemable> | |
RWIOUEscrow<Redeemable> | |
RWIOUResult<Redeemable> | |
RWIOUTrap<Redeemable> | |
RWPCPtrBufferBase<Type> | |
RWPCPtrQueue<Type> | |
RWPCPtrStack<Type> | |
RWPCValBufferBase<Type> | |
RWPCValBufferBaseDecorated<Type,Decorator> | |
RWPCValBufferBaseGuarded<Type,GuardDecorator> | |
RWPCValBufferBaseGuardedPrioritized<Type,GuardAndPriorityDecorator> | RWTPCValBufferBaseGuardedPrioritized<Type,GuardAndPriorityDecorator> |
RWPCValBufferBasePrioritized<Type,PriorityDecorator> | |
RWPCValQueue<Type> | |
RWPCValQueueGuarded<Type> | |
RWPCValQueueGuardedPrioritized<Type> | |
RWPCValQueuePrioritized<Type> | |
RWPCValStack<Type> | |
RWPCValStackGuarded<Type> | |
RWPCValStackGuardedPrioritized<Type> | |
RWPCValStackPrioritized<Type> |
Table 10 lists the renamed classes in the Smart Pointer package.
Former Name | New Name |
RWCountedPointer<Body> | |
RWCountingBody<Mutex> | |
RWMonitor<Mutex> | |
RWOnlyPointer<Body> | |
RWPointer<Body> | |
RWTHRBody | RWBodyBase |
RWTHRHandle | RWHandleBase |
Table 11 lists the renamed classes in the Synchronization package.
Former Name | New Name |
RWGuardBase<Resource> | |
RWLockGuard<Resource> | |
RWLockGuardBase<Resource> | |
RWMonitor<Mutex> | |
RWReadGuardBase<Resource> | |
RWReadLockGuard<Resource> | |
RWReadLockGuardBase<Resource> | |
RWReadUnlockGuard<Resource> | |
RWTryLockGuard<Resource> | |
RWTryLockGuard<Resource> | |
RWTryWriteLockGuard<Resource> | |
RWUnlockGuard<Resource> | |
RWWriteGuardBase<Resource> | |
RWWriteLockGuard<Resource> | |
RWWriteLockGuardBase<Resource> | |
RWWriteUnlockGuard<Resource> |
Table 12 lists the renamed classes in the Thread-compatible Exception package.
Former Name | New Name |
RWTHRCompatibleException<Exception> |
Table 13 lists the renamed classes in the Threading package.
Former Name | New Name |
RWRunnableIOUFunction<Return> | |
RWThreadEscrowImp<Redeemable> | |
RWThreadIOUFunction<Return> | |
RWThreadLocal<Type> |
Table 8 lists the renamed exception classes in the Execution Tracing package. For more information on the new class names, see the class descriptions in the Threads Module Reference Guide.
Former Name | New Name |
RWTraceEventClientImp::TraceClientAlreadyConnected | RWTraceClientAlreadyConnected |
RWTraceSingleClientFilterImp::TraceClientAlreadyAdded | RWTraceClientAlreadyAdded |
RWTraceSingleClientFilterImp::TraceClientAlreadyAdded | RWTraceClientAlreadyAdded |
RWTraceEventClientImp::TraceClientNotConnected | RWTraceClientNotConnected |
RWTraceEventClient::InvalidPointer | RWTraceInvalidPointer |
The following table lists the renamed global functions and macros in the Threads Module. For more information on the new names, see the global reference descriptions in the Threads Module Reference Guide.
Former Name | New Name |
rwMakeFunctor0() | |
rwMakeFunctor1() | |
rwMakeFunctor2() | |
rwMakeFunctorR0() | |
rwMakeFunctorR1() | |
rwMakeFunctorR2() | |
rwMakeIOUCallback() | |
rwMakeRunnableCallback() | |
rwMakeRunnableFunction() | |
rwMakeRunnableGuard() | |
rwMakeRunnableIOUFunction() | |
rwMakeThreadFunction() | |
rwMakeThreadIOU() | |
rwMakeThreadIOUFunction() |
Table 16 lists the remaining major changes in Threads.h++ 2.0 of the Threads.h++ API. For more information on API changes, see the readme or class descriptions in the Threads Module Reference Guide for this version.
API | Description of Change |
RWCancellationState is no longer an enumerated type, but a typedef for a function pointer. | |
New class, located within the Smart Pointer package. This typedef can be used as the second template parameter for RWTCountingPointer<Body, Counter=RWSafeCounter>, in order to implement multithread-safe reference counting. | |
Functionality previously provided by member function RWSynchObject::enableCancellation(void)has been replaced by RWSynchObject::setCancellation(RWCancellationState). | |
New class, located within the Smart Pointer package. Defines a reference-counted smart pointer that provides reference counting semantics for types that do not directly support reference counting. | |
New class, located within the Smart Pointer package. Ensures that a class has only one instance, and provides a global point of access to it. | |
New class, located within the Smart Pointer package. Can be used as the second template parameter for RWTCountingPointer<Body, Counter=RWSafeCounter>, to achieve greater efficiency in reference counting if thread-safety is not required. | |
Functions that previously threw RWxmsg | Several functions that previously threw RWxmsg exceptions now throw thread-compatible exceptions such as RWTHRInternalError. See the readme file for a detailed list of these functions. |
Exception specifications | Removed all exception specifications from Threads.h++ code. |
RW_THR_DEBUG | It is no longer necessary to define RW_THR_DEBUG to build with the debug version of the library. Only RWDEBUG need be defined. |
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.