Quantitative Analysis.
Trading Platform.
Python for Excel.
Author.
I.Installation.
II.OTS Scheduler.
1.Threading primitives.
A.Encapsulation of primitives.
B.Preventing starvation.
C.Preventing race condition.
D.Barriers.
2.NonBlockingQueue.
3.ThreadPool.
4.ThreadMaster.
5.Scheduler implementation.
III.OTS Python Object Browser.
Bibliography.
Forum Index Contents Downloads

Encapsulation of primitives.


he file otsConfig.hpp contains several meta-functions (see [Abrahams1] for definition of meta-function) that encapsule most common implementation primitives. Such encapsulation allows for substitution of implementation without changing the higher levels of the project's code. It also contains definition of templated primitives that uniformly accept template parameters defined in different libraries.

The file otsConfig.hpp uses forward definitions and does not include most implementation hpp-files. This must be so to prevent excessive compile-time cross-dependencies. Hence, when using most of the metafunctions defined in otsConfig.hpp the programmer also have to include header files for the classes instantiated in the meta-function body.

The following section explains the use of the otsConfig-defined threading primitives.





Forum Index Contents Download


















Copyright 2009.