The principle role of the Threading package is to allow you to create threads on a variety of operating systems and platforms. The Threading package includes:
Thread management classes
The runnable family of classes allows you to create, control, and monitor threads of execution within your application. The synchronous runnable classes allow you to define work for existing threads of execution. The threaded runnable classes allow you to create new threads of execution for asynchronous activities.
Thread server classes
The runnable server and runnable server pool classes are a ready-to-use solution for threading your application. These classes allow for creation of a single thread or a pool of threads that, once started, wait for your application to enqueue other runnable objects for execution. By using the functor-based runnable classes, your application can essentially queue any function for execution within a server. Runnables and runnable server classes are essential building-blocks for constructing active or thread-hot objects within your application.
Thread-safe foundation mechanisms
The Threading package uses thread-safe smart-pointer classes (found in the Smart Pointer package) for thread-safe and exception-safe management of dynamically allocated resources. You can use the Thread-compatible Exception package family of store-and-forward exception classes to communicate error conditions across thread-boundaries.
Resource management protection
The Threading package uses the handle-body idiom with thread-safe reference-counting for instance life-cycle management. This idiom helps to eliminate potential memory resource access errors and leaks, especially in the presence of C++ exceptions and multiple threads. Function pointers are the only raw pointers in the Threading package public interface.
The Threading package depends on the Thread-compatible Exception, Execution Tracing, Synchronization, Smart Pointer, Functor, and Interthread Communication packages of Threads.h++.
The rw\thread directory contains a header file for each class in the Threading package. The header files are named classname.h. You can also access the declarations for the entire package through thread.h, an umbrella file that includes the header files for all the classes.
©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.