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

Commits on Oct 11, 2013

  1. Changed PluginFactoryBase::*findPMaker to return void*

    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.
    Dr15Jones committed Oct 11, 2013
    Configuration menu
    Copy the full SHA
    b500156 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a7fb8cd View commit details
    Browse the repository at this point in the history
  3. Use mutex to protect Plugin system

    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 committed Oct 11, 2013
    Configuration menu
    Copy the full SHA
    2b96b07 View commit details
    Browse the repository at this point in the history