Threads.h++ 2.0 is a major release of the Threads.h++ product. This release includes numerous internal improvements, as well as important changes to the public interface. See Appendix A for information about compatibility.
Changes to the public interface in version 2.0 include:
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 Threads.h++ 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 invocationof 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 14 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. Please see Appendix A for complete documentation of these changes.
Table 14 lists the remaining major changes in version 2.0 of the Threads.h++ API. For more information on API changes, see the readme or class descriptions in the Class Reference.
API | Description of Change |
RWCancellationState |
RWCancellationState is no longer an enumerated type, but a typedef for a function pointer. See Appendix A.7.3 for complete information. |
RWSafeCounter |
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. |
RWSynchObject |
Functionality previously provided by member function RWSynchObject::enableCancellation(void)has been replaced by RWSynchObject::setCancellation(RWCancellationState). See Appendix A.7 for more information. |
RWTCountingPointer |
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. |
RWTSingleton |
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. |
RWUnsafeCounter |
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 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.