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

Thread safe plugin system #1068

Merged
merged 3 commits into from Oct 14, 2013
Merged

Conversation

Dr15Jones
Copy link
Contributor

Used mutexes to serialize access to dlopen and protect data structures used in the plugin system

The functions *findPMaker used to return an iterator to an internal structure of PluginFactoryBase. This exposed the implementation too much (since it will be changed next). However, the calling routine didn’t really care about the iterator and always just pull one particular value from the iterator. The functions now returns that one value.
dlopen is not thread safe and therefore must be protected from simultaneous access. Given that this system is used outside of cmsRun using a mutex was considered the best option for serialization. Given the fact that the plugin system shouldn’t be called in a time critical manner, it was easiest to protect the member data also using a mutex. If this causes a performance problem, we can review it and try to use a tbb thread-safe container instead.
@Dr15Jones
Copy link
Contributor Author

+1
All framework tests pass

@cmsbuild
Copy link
Contributor

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?

@Dr15Jones
Copy link
Contributor Author

@nclopezo ping?

ktf added a commit that referenced this pull request Oct 14, 2013
@ktf ktf merged commit fb4918a into cms-sw:CMSSW_7_0_X Oct 14, 2013
nclopezo added a commit to nclopezo/cmssw that referenced this pull request Oct 15, 2013
…nSystem_7_X"

This reverts commit fb4918a, reversing
changes made to 265c27b.
nclopezo added a commit that referenced this pull request Oct 15, 2013
Revert "Merge pull request #1068 from Dr15Jones/threadSafePluginSystem_7...
@Dr15Jones Dr15Jones deleted the threadSafePluginSystem_7_X branch October 17, 2013 16:48
epalencia added a commit to epalencia/cmssw that referenced this pull request Mar 1, 2023
Remove hackConditions from calo only re-emulation config
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

3 participants