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

I. Installation.
II. Threading primitives.
III. NonBlockingQueue.
IV. ThreadPool.
V. ThreadMaster.
VI. OTS Scheduler.
1. Scheduler implementation.
A. Node class.
B. Exception handling policy.
2. Customization of Scheduler. Interfaces IOrigin and IProxy.
3. Acceptance test for the Scheduler.
VII. Bibliography
Downloads. Index. Contents.

Exception handling policy.

ll operations, performed on the customization points theProxy and theOrigin, are surrounded by the try-catch blocks. The procedure does not grab new memory when processing updates. The creation operations are watched and std::bad_allocs are reported to the user. The only reason why any function would throw is the troublesome boost::thread_resource_error.

The update procedure is hardly atomic. Even if we try to reverse the update operation then we would still need to do locking of shared data. Such operations would, in turn, throw. Fortunately, boost::thread_resource_error is very rare. Hence, we adopt the following policy. When any uncaught exception occurs, all processing is postponed, the offending thread is restarted and the processing copy of the dependency tree is reset to initial condition. The notifications are sent to theOrigins and theProxies of all reset Nodes. The processing resumes after the resetting is finished.

Downloads. Index. Contents.

Copyright 2007