Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Resolver concurrency fix #6425

merged 2 commits into from May 21, 2012
Commits on May 21, 2012
  1. Make the Resolver template cache threadsafe - closes #6404

    pinetops committed May 20, 2012
    The Template cache in the Resolver can be accessed by multiple threads
    similtaneously in multi-threaded environments. The cache is implemented
    using a Hash, which isn't threadsafe in all VMs (notably JRuby).
    This commit extracts the cache to a new Cache class and adds mutexes to
    prevent concurrent access.
  2. More granular locking of the Resolver template cache

    pinetops committed May 21, 2012
    In order to avoid holding a global lock when doing template
    resolution, instead add individual locks on a per cache entry
    basis. The global lock is now only used for manipulation of the main
    cache data structure.