Uploaded image for project: 'Commons Sandbox'
  1. Commons Sandbox
  2. SANDBOX-323

Support for ASM 3.2 / 3.3 and in/out continuations parameters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Nightly Builds
    • Nightly Builds
    • Javaflow
    • None
    • SUN JDK 1.6

    Description

      1. Currently JavaFlow can't be used with new ASM builds due to incompatible changes introduced in ASM 3.2, the patch provided adds support for ASM 3.2 / 3.3, so JavaFlow may be used with any ASM 3.x version

      2. There is no API to return result from suspended continuation, ad-hoc custom logic with ThreadLocal variables is necessary for this. The patch contains necessary API improvements.

      // In continuation
      final Object varReceivedByContinuation = Continuation.suspend(varPassedByContinuation);

      // In calling client
      final Continuation cc = Continuation.startWith(code);
      System.out.println(cc.value()); // value() is yielded by continuation

      In certain sense this works as "yield" operator found in other programming languages, and has even richer semantics.

      3. Miscellaneous: continuation-specific Iterable/Iterator are provided with patch as well to simplify iteration over multiple values yielded by continuation code; they are named CoRoutine / CoIterator in code.

      Attachments

        1. JavaFlow-SANDBOX-323.patch
          61 kB
          Niall Pemberton
        2. javaflow_modified.zip
          49 kB
          Valery Silaev

        Activity

          People

            tcurdt Torsten Curdt
            vsilaev Valery Silaev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: