Skip to content
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

Merged

Conversation

Dr15Jones
Copy link
Contributor

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.

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.
@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 8, 2013

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
DataFormats/Common

@cmsbuild, @vadler, @Dr15Jones, @ktf, @nclopezo can you please review it and eventually sign? Thanks.
@wmtan this is something you requested to watch as well.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.
@ktf you are the release manager for this.

@Dr15Jones
Copy link
Contributor Author

+1
The DataFormats/Common part is the same as PR #1387

@vadler
Copy link

vadler commented Nov 8, 2013

+1

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 8, 2013

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?

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 8, 2013

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 8, 2013

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?

ktf added a commit that referenced this pull request Nov 10, 2013
…Candidates

Multithreading fixes -- Thread safe fixes DataFormats/PatCandidates
@ktf ktf merged commit 3fc68e2 into cms-sw:CMSSW_7_0_X Nov 10, 2013
@Dr15Jones Dr15Jones deleted the threadSafeFixesDataFormatsPatCandidates branch November 14, 2013 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants