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.
|