-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 safety issues #2816
Thread safety issues #2816
Conversation
Mark mutable so static analyzer knows it is protected by atomic. Fix thread safety issue in the copy constructor. Use default memory behavior in the atomic functions.
A new Pull Request was created by @wddgit (W. David Dagenhart) for CMSSW_7_1_X. Thread safety issues It involves the following packages: MagneticField/Engine @nclopezo, @cmsbuild, @anton-a, @thspeer, @slava77, @Degano can you please review it and eventually sign? Thanks. |
@@ -59,7 +59,7 @@ class MagneticField | |||
//nominal field value | |||
virtual int computeNominalValue() const; | |||
mutable std::atomic<char> nominalValueCompiuted; | |||
mutable int theNominalValue; | |||
[[cms::thread_guard("nominalValueCompiuted")]] mutable int theNominalValue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
compiuted, heh
MagneticField/Engine -- Thread safety issues
Mark mutable so static analyzer knows it is protected
by atomic. Fix thread safety issue in the copy constructor.
Use default memory behavior in the atomic functions.