[ https://issues.apache.org/jira/browse/TAP5-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678801#action_12678801 ]
Howard M. Lewis Ship commented on TAP5-84: ------------------------------------------ After a brief look, using simple volatile fields seems to be the way to go, with a double-check (which is ok for volatile fields). I also found a way to eliminate the need for a volatile shutdown flag, sort of merging that back into the ObjectCreator. Still its hard to tell if there's a performance difference especially under JDK 1.6. Supposedly uncontested synchronized locks are super cheap in JDK 1.6 and volatiles are always more expensive than normal field access. > Change proxy generation to use atomic references rather than synchronized > blocks > -------------------------------------------------------------------------------- > > Key: TAP5-84 > URL: https://issues.apache.org/jira/browse/TAP5-84 > Project: Tapestry 5 > Issue Type: Improvement > Affects Versions: 5.0.15 > Reporter: Howard M. Lewis Ship > Assignee: Howard M. Lewis Ship > Priority: Minor > > As currently coded, the service proxies used for Tapestry services use a > synchronized block to a) check to see if the Registry has shut down and b) > obtain (if needed) the realized service implementation (wrapped by > interceptors, etc.). > It seems that with some juggling, these could largely be replaced with > AtomicBoolean and AtomicReferences. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.