You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jochen Kemnade (JIRA)" <ji...@apache.org> on 2014/06/27 18:13:24 UTC

[jira] [Created] (TAP5-2357) Release global session lock if an immutable attribute is read

Jochen Kemnade created TAP5-2357:
------------------------------------

             Summary: Release global session lock if an immutable attribute is read
                 Key: TAP5-2357
                 URL: https://issues.apache.org/jira/browse/TAP5-2357
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.4
            Reporter: Jochen Kemnade
         Attachments: 0001-Downgrade-the-global-session-write-lock-to-a-read-lo.patch

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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)