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
Create a context around TFile::Open() so the context is unregistered … #15670
Create a context around TFile::Open() so the context is unregistered … #15670
Conversation
…in the same threaded it was registered
A new Pull Request was created by @dan131riley (Dan Riley) for CMSSW_8_1_X. It involves the following packages: IOPool/Input @cmsbuild, @smuzaffar, @Dr15Jones, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are list here #13028 |
please test |
+1 |
The tests are being triggered in jenkins. |
This pull request is fully signed and it will be integrated in one of the next CMSSW_8_1_X IBs after it passes the integration tests. This pull request requires discussion in the ORP meeting before it's merged. @slava77, @davidlange6, @smuzaffar |
+1 |
…in the same thread it was registered in
ROOT's context management implicitly assumes that a file is opened and closed on the same thread, which may not be true for secondary files opened by the MixingModule, and in the future may not be true for primary input files. To avoid the problem, this PR declares a local TContext object in the scope where TFile::Open() is called; when the TContext goes out of scope, its destructor unregisters the context, guaranteeing the context is unregistered in the same thread it was registered in. Hopefully fixes issue #15524.