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

static data member is not thread safe and doesn't need to be static #1374

Merged
merged 1 commit into from Nov 10, 2013

Conversation

wmtan
Copy link
Contributor

@wmtan wmtan commented Nov 7, 2013

The class SmartPropagator has a non-const static data member that should not be static, for several reasons:

  1. it's not thread safe.
  2. If the constructor gets called multiple times with different values of the 'epsilon' argument, the new value will not be used. This is a bug. In CMSSW at the moment, it is always called with the same value, but it still is a bug.

This pull request makes the data member non-static.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 7, 2013

A new Pull Request was created by @wmtan for CMSSW_7_0_X.

static data member is not thread safe and doesn't need to be static

It involves the following packages:

TrackingTools/GeomPropagators

@nclopezo, @cmsbuild, @thspeer, @slava77 can you please review it and eventually sign? Thanks.
@gpetruc, @cerati, @GiacomoSguazzoni, @rovere 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.

@cmsbuild
Copy link
Contributor

cmsbuild commented Nov 8, 2013

@thspeer
Copy link
Contributor

thspeer commented Nov 8, 2013

+1
Tested 48829b3 in CMSSW_7_0_X_2013-11-08-0200-1374
No difference in reco, based on RelMon and reco scripts.

@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
Multithreading fixes -- static data member is not thread safe and doesn't need to be static
@ktf ktf merged commit b353d8e into cms-sw:CMSSW_7_0_X Nov 10, 2013
@wmtan wmtan deleted the MakeNotStaticForThreadSafety branch November 10, 2013 23:35
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.

None yet

4 participants