- OpenThreads
OpenThreads is an
open source lightweight cross-platform thread model. It is intended to provide a minimal and complete Object-Oriented (OO) thread interface forC++ programmers. It is loosely modeled on the Java thread API, and the POSIX Threads standards.Architecture
The
architecture of the library is designed around "swappable" thread models which are defined atcompile-time in a shared object library. It is of importance to note that while a factory pattern design could have been used to achieve the goal of generic interface, it would have required the programmer to allocate each of the 4 fundamental types (Thread, Mutex, Barrier, & Condition) on the heap. Due to the cost associated with heap allocation of the underlying concrete implementations of these constructs on some platforms, such allocation was deemed unacceptable at the time this library was originally written, and thus the factory pattern was not used.Instead, a somewhat abstruse - but effective - technique was chosen to provide the necessary data/implementation hiding. This technique uses private
void pointer s to encapsulate object private data. The void pointers actually point at concrete data structures, but give a uniform interface to the dso.It is the intent of the
Open Thread Group that the interfaces (header files) will be used to construct optimized implementations using platform optimized multi-processing constructs such as thesproc methods used on IRIX & Windows (tm) threads on thatSeattle based platform. There are currently concrete implementations using both POSIX and Microsoft Windows (tm) Threads in CVS.ee also
*
List of multi-threading libraries External links
* [http://openthreads.sourceforge.net/ Home page]
Wikimedia Foundation. 2010.