Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.0-JSR-3
    • None
    • groovy-runtime
    • 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...

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            codevise Dierk König

            Dates

              Created:
              Updated:

              Slack

                Issue deployment