Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-4530

@ThreadInterrupt AST Transformation

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8-beta-3
    • Component/s: ast builder
    • Labels:
      None
    • Flags:
      Patch

      Description

      Following the discussion at http://groovy.329449.n5.nabble.com/InterruptibleScript-AST-Transform-tp3277076p3277076.html, this AST Transformation allows transparent script interruption when the worker thread is interrupted. It adds thread interruption checks on several points of code :

      • closures
      • different types of loops
      • method first statement

      The attached file is a preliminary implementation which does not propagate to the CompilationUnit yet (haven't found how to do it properly) + a simple script which I use for tests.

      Feel free to review, patch,...

        Attachments

        1. interruptible-ast.tar.gz
          2 kB
          Cédric Champeau
        2. 5430.patch
          22 kB
          Hamlet D'Arcy

          Activity

            People

            • Assignee:
              hamletdrc Hamlet D'Arcy
              Reporter:
              melix Cédric Champeau
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: