Details

    • Type: Sub-task Sub-task
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0-JSR-3
    • Fix Version/s: None
    • Component/s: groovy-runtime
    • Labels:
      None

      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

        Dierk König created issue -
        Guillaume Delcroix made changes -
        Field Original Value New Value
        Fix Version/s 1.0-JSR-5 [ 12102 ]
        Fix Version/s 1.0-JSR-4 [ 11905 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.0-RC-1 [ 12103 ]
        Fix Version/s 1.0-JSR-5 [ 12102 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.0-JSR-6 [ 12103 ]
        Fix Version/s 1.0-RC-1 [ 12104 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.0-RC-1 [ 12104 ]
        Fix Version/s 1.0-final [ 10244 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.1 [ 10436 ]
        Fix Version/s 1.0 [ 10244 ]
        Guillaume Delcroix made changes -
        Fix Version/s 1.1-beta-2 [ 10436 ]
        Jochen Theodorou made changes -
        Parent GROOVY-2503 [ 61571 ]
        Issue Type Improvement [ 4 ] Sub-task [ 7 ]
        Jochen Theodorou made changes -
        Component/s groovy-runtime [ 16250 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12730242 ] Default workflow, editable Closed status [ 12742201 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12968659 ] Default workflow, editable Closed status [ 12976315 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Dierk König
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development