OpenThreads

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 for C++ 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 at compile-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 pointers 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 the sproc methods used on IRIX & Windows (tm) threads on that Seattle 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.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • OpenSceneGraph — Stable release 3.0.1 / July 31, 2011; 2 months ago (2011 07 31) Preview release 2.9.16 / June 9, 2011; 4 months ago …   Wikipedia

  • OpenSceneGraph — Desarrollador Don Burns y Robert Osfield [1] Información general …   Wikipedia Español

  • List of multi-threading libraries — List of cross platform multi threading libraries for the c++ programming language.* Boost C++ Libraries * OpenMP * OpenThreads * POCO Thread (part of POCO project http://pocoproject.org/poco/info/index.html ) * Zthread * Intel Threading Building… …   Wikipedia

  • Список многопоточных библиотек C++ — Список кроссплатформенных многопоточных библиотек для языка программирования C++. Набор библиотек Boost OpenMP OpenThreads POCO Thread (часть проекта POCO  http://pocoproject.org/poco/info/index.html ) Zthread Pthreads (Ptreads w32) Qt4… …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”