"Proper" Thread Safety
Make rivet fully thread safe by eliminating the global projection handler and instead giving each AnalysisHandler its own ProjectionHandler (pointer). See Issue #84 (closed) for the original discussion/ideas behind this MR.
Most of the changes are based on changing how projections are registered to this new handler. The key addition is the _declQueue
, which stores child projections for projection appliers which are not yet owned. The _syncDeclQueue()
function then flushes this queue, and registers projections to the projection handler.
Not yet finished! - need for cleanup and further testing (though I'd be at least mildly surprised if it failed to run/produced wildly inaccurate results at this stage).
The plan is to give a brief presentation about this MR at the rivet developers meeting on February 9th 2022. As I'll hopefully develop some nice diagrams/explanations before then, I'll try and post anything useful to this MR also.