jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
groovy
  • groovy
  • GROOVY-2503 MOP 2.0 design inflluencing issues
  • GROOVY-1096

make ProxyMetaClass threadsafe

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Sub-task Sub-task
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.0-JSR-3
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

John Wilson:
I have been looking at the code for ProxyMetaClass and I'm a little
concerned by "void use(Closure closure)". This changes the metaclass
returned by the registry for the duration of the execution of the
closure.
[..]
2/ this is not thread safe: the code changes the metaclass for all
the threads in the JVM.
[..]
Is 2/ the intended behaviour? If not we need to do something like
the thread local storage trick done by Sam's "use" implementation.

Dierk:
2/ Yes, I raised the issue myself when commenting the commit.
Using a TreadLocal is fine for me.

We should investigate on the need for additional
'synchronized' modifiers...

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
No work has yet been logged on this issue.

People

  • Assignee:
    Unassigned
    Reporter:
    Dierk Koenig
Vote (0)
Watch (0)

Dates

  • Created:
    17/Oct/05 8:17 AM
    Updated:
    30/Dec/10 6:58 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.