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
atomize counters in BaseIsolator.h #26586
Conversation
both try_ and fail_ counters should nominally be updated in sync.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-26586/9512
|
@cmsbuild please test |
The tests are being triggered in jenkins. |
A new Pull Request was created by @slava77 (Slava Krutelyov) for master. It involves the following packages: PhysicsTools/PatAlgos @perrotta, @cmsbuild, @santocch, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
+1 The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
@slava77 I am not sure I fully get the meaning of your last sentence in the PR description. Defining the counters as atomic ensures that there is no conflicting updates by multiple threads, but the global counter should still finally be correct. Or am I missing something? The problem might happen if a thread is reading the counters while another is writing them |
Ideally,
I do not consider having the above done appropriately as a requirement for this code full thread consistency/safety. Hence, my last message in the PR description. |
+1 |
merge |
+1 |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will be automatically merged. |
some mutables are used as counters and are showing up as static analyzer warnings. In the case of BaseIsolator, the simplest is to atomize them, as done in this PR.
The counters here are used for printing of statistics of the
test
method calls. I do not see a strong need for a correctness of this in a multithreaded environment.The
atomic
is effectively to just silence the warning.