Quantitative Analysis
Parallel Processing
Numerical Analysis
C++ Multithreading
Python for Excel
Python Utilities
Services
Author

I. Installation.
II. Threading primitives.
III. NonBlockingQueue.
1. NonBlockingQueue design.
2. Simplest example with NonBlockingQueue.
3. NonBlockingQueue prototypes.
4. Python-based acceptance test of NonBlockingQueue.
IV. ThreadPool.
V. ThreadMaster.
VI. OTS Scheduler.
VII. Bibliography
Downloads. Index. Contents.

Simplest example with NonBlockingQueue.


he following code is the simplest example of use.

Line 07: Create a queue.

Line 09: Create a piece of data.

Line 10: Push the piece of data into the queue.

Line 11: Pop the piece of data from the queue.

01\ #include <NonBlockingQueue.hpp>

02\ typedef std::string TestData;

02a\ typedef ots::scheduler::NonBlockingQueue<TestData> TestQueue;

02b\ typedef TestQueue::Node TestNode;

03\ bool simpleTest()

04\ {

07\ TestQueue queue;

08\ const std::string s("Hello!");

09\ TestNode node(s);

10\ queue.push(node);

11\ volatile TestNode& n=queue.pop();

12\ return &node==&n;

13\ }





Downloads. Index. Contents.


















Copyright 2007