-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thread safe fixes DataFormats/PatCandidates #1388
Thread safe fixes DataFormats/PatCandidates #1388
Conversation
Moved the calculation of the name demangling to a static function of the base class. This allowed the removal of a non-const static and avoided having to create that code for each template type. The const static name only needs call that function once per job. This will avoid a potential thread-safety issue.
…AllFilter The class AcceptAllFilter has a method singleton method 'get' which was creating a non-const function static and returning it a const. This was replaced with a const class static so that the compiler didn't have to create code in each calling file for the function static. This avoids having the static analyzer produce a thread-safety complaint.
Used std::atomic<*> to manage a thread safe cache of information. This dropped a transient data member so classes_def_objects.xml file had to be changed.
Changed caches to be of type edm::AtomicPtrCache<> to avoid thread safety issues.
The non-const version of operator* was missing a ‘*’ and was not caught since it had not been called. Updated the unit test so it tests all the functions, both const and non-const.
ROOT 5 complains about ROOT iorules for edm::AtomicPtrCache even though it is a transient data member. I spoke with Philippe Canal and he said it is a deficiency of Cintex and will not be in ROOT 6. This is a work around until we move to ROOT 6.
A new Pull Request was created by @Dr15Jones (Chris Jones) for CMSSW_7_0_X. Thread safe fixes DataFormats/PatCandidates It involves the following packages: DataFormats/PatCandidates @cmsbuild, @vadler, @Dr15Jones, @ktf, @nclopezo can you please review it and eventually sign? Thanks. |
+1 |
+1 |
This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it? |
This pull request is fully signed and it will be integrated in one of the next IBs unless changes or unless it breaks tests. @ktf can you please take care of it? |
…Candidates Multithreading fixes -- Thread safe fixes DataFormats/PatCandidates
This replaces PR #1375. The replacement was needed since I had to merge in code from a different PR which made github think I had changed 99 files insteasd of just 13. This is the same modifications but using a rebase instead of a merge.