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

@ThreadInterrupt AST Transformation

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.8-beta-3
    • ast builder
    • None
    • 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. 5430.patch
          22 kB
          Hamlet D'Arcy
        2. interruptible-ast.tar.gz
          2 kB
          Cédric Champeau

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: