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

Threading primitives.


t is presumed that the reader is familiar with boost::thread library and basic concepts of multi-threaded programming such as deadlock, starvation and race-condition.

The boost library is the principal implementation tool of this project. However, we avoid hard coding of such implementation choice by introducing a template-based layer that encapsulates most external primitives. We introduce several additional primitives designed to prevent starvation and race condition. The traditional primitives for exception-safe locking are also present.

The exception safety is identical to the exception safety of boost::thread. Everything that locks may throw ots::config::ThreadResourceError. Some join and sleep-like functions throw ots::config::ThreadInterrupted.




A.Encapsulation of primitives.
B.Preventing starvation.
C.Preventing race condition.
D.Barriers.

Forum Index Contents Download


















Copyright 2009.