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

I. Installation.
II. Threading primitives.
1. Encapsulation of primitives.
2. Preventing starvation.
3. Preventing race condition.
4. Barriers.
A. SignaledBarrier.
B. SignaledCountingBarrier.
C. SignaledCountingBarrier2.
D. Barrier.
III. NonBlockingQueue.
IV. ThreadPool.
V. ThreadMaster.
VI. OTS Scheduler.
VII. Bibliography
Downloads. Index. Contents.

SignaledBarrier.


he SignaledBarrier has two states: Open and Closed. In Open state the member function SignaledBarrier::waitForOpen returns immediately. In the Closed state it blocks until the state changes to Open. The thread-safe member functions SignaledBarrier::open and SignaledBarrier::close control the state.

The following is the public interface of SignaledBarrier:

class SignaledBarrier : boost::noncopyable

{

public:

SignaledBarrier();

void waitForOpen() volatile;

void open() volatile;

void close() volatile;

};

The Signaled barrier should be accessed via the following statements:

#include <ots/threading/SignaledBarrier.hpp>

#include <ots/otsConfig.hpp>

typedef ots::config::SignaledBarrier::type SignaledBarrier.

The member functions throw either ots::config::ThreadResourceError (=boost::thread_resource_error by default ots::config setting) or ots::ThreadInterrupted (=boost::thread_interrupted).





Downloads. Index. Contents.


















Copyright 2007