Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2357

Release global session write lock if only immutable attributes are read

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 5.4
    • None
    • tapestry-core

    Description

      Tapestry 5.4 acquires a write lock on the session when reading attributes. This is to prevent race conditions if the attribute is mutable and modified from multiple threads.
      If an attribute is immutable, the lock could be downgraded to a read lock.
      The patch adds a MutabilityAnalyzer service that uses a contributable chain of command to check whether an object is immutable. The session locking code uses that service to downgrade the write lock if the HTTP handler thread only reads immutable attributes.

      Attachments

        Issue Links

          Activity

            People

              hlship Howard Lewis Ship
              jkemnade Jochen Kemnade
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: