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 safety #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Commits on Aug 7, 2013

  1. Thread safety

    This is to improve thread safety for static methods that may be called from multiple threads.
    This change does not affect the thread safety of individual HttpRequest instances.
    
    Use ThreadLocal for trustedFactory, as the documentation for the classes used makes no thread-
    safety guarantees.
    Make TRUSTED_VERIFIER final and initialize lazily using the lazy initialization holder class
    idiom used in Effective Java item 71, as the implementation used is thread-safe.
    Make connectionFactory volatile.  This requires implementers of the ConnectionFactory interface
    to ensure that their implementation is thread-safe.
    
    This also changes the static members used that were not final to use the more conventional
    camelCase naming rather than ALL_CAPS.
    Ryan Mentley committed Aug 7, 2013
    Configuration menu
    Copy the full SHA
    e9c8d64 View commit details
    Browse the repository at this point in the history