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
make statics class members #1430
make statics class members #1430
Conversation
A new Pull Request was created by @gartung (Patrick Gartung) for CMSSW_7_0_X. make statics class members It involves the following packages: RecoMET/METAlgorithms @nclopezo, @cmsbuild, @thspeer, @slava77 can you please review it and eventually sign? Thanks. |
If the CSCHaloAlgo is made every every (which I haven't checked) then you'd get the same message every event, which that static would have avoided. If the CSCHaloAlgo sticks around a long time, it's not a big deal. |
{ | ||
static bool MuonTimeFail = false; | ||
{ | ||
static std::atomic<bool> MuonTimeFail{false}; | ||
if( !MuonTimeFail ) |
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.
On each of the `if`` blocks you will want to change them to
bool expected=false;
if(MuonTimeFail.compare_exchange_strong(expected,true,std::memory_order_acq_rel) ) {
and then get rid of the MuonTimeFail = true
.
Looks good to me. |
+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? |
Multithreading fixes -- Make statics class members in RecoMET/METAlgorithms
No description provided.