cms-sw/cmssw — pull request #5950 by Dr15Jones (2014-10-22 20:05:40+00:00)
Title: Make StorageFactory's StorageMaker cache thread safe

Given the use of SecondarySource, it is possible for multiple modules to ask the StorageFactory to open a file simultaneously. Switching the cache to use a tbb::concurrent_unordered_map avoids race conditions. In addition, having the map hold std::shared_ptr makes lifetime issues easier to deal with. [Can't use a std::unique_ptr since tbb::concurrent_unordered_map can't deal with R-value references.]