Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core Classes/Modules
    • Labels:
      None
    • Number of attachments :
      2

      Description

      This bug will track work to integrate support for Lukas Stadler's JVM coroutines (part of the MLVM family of projects) into Enumerator#next/rewind and Fiber.

      Currently both features are implemented using native threads. This works, but makes them considerably heavier than they ought to be. Lukas's work to add coroutines to the JVM makes it possible for us to have very efficient coroutine-like libraries like Enumerator#next and Fiber. We should incorporate support for his work, conditionally loaded only when it is available.

      I'm attaching a coroutine-based-Fibers patch provided by Lukas. This is an old patch that needs updating, but it may not take too much to do that. We also would need to isolate this and have a thread-based impl that we use on non-coro JVMs.

      There's also some early work in the "coro" branch to make Enumerator#next and Enumerator#rewind use Lukas's coroutines.

        Activity

        Hide
        Steve Shreeve added a comment -

        Is there any update on this? Thanks.

        Show
        Steve Shreeve added a comment - Is there any update on this? Thanks.
        Hide
        Tobias Schlottke added a comment -

        As far as I understand the 1.6.5 changeset, coroutines are now being used in jRuby.

        Show
        Tobias Schlottke added a comment - As far as I understand the 1.6.5 changeset, coroutines are now being used in jRuby.
        Hide
        Charles Oliver Nutter added a comment -

        It is now possible for coroutine-based fibers to be used, if they are present on the underlying JVM. Normally, though, they're still threaded.

        We still do not use coroutines for Enumerator#next, though.

        To enable coroutine-based fibers, pass -Xfiber.coroutines=true to JRuby when running atop a coroutine-enabled JVM.

        For information about coroutine support in OpenJDK (and for a prebuilt Linux binary) see http://ssw.jku.at/General/Staff/LS/coro/.

        Show
        Charles Oliver Nutter added a comment - It is now possible for coroutine-based fibers to be used, if they are present on the underlying JVM. Normally, though, they're still threaded. We still do not use coroutines for Enumerator#next, though. To enable coroutine-based fibers, pass -Xfiber.coroutines=true to JRuby when running atop a coroutine-enabled JVM. For information about coroutine support in OpenJDK (and for a prebuilt Linux binary) see http://ssw.jku.at/General/Staff/LS/coro/ .
        Hide
        Charles Oliver Nutter added a comment -

        FWIW, the coroutine fibers shipped in 1.6.5.

        Show
        Charles Oliver Nutter added a comment - FWIW, the coroutine fibers shipped in 1.6.5.
        Hide
        Charles Oliver Nutter added a comment -

        JRuby has moved bug tracking to Github, accessible via our Github page at https://github.com/jruby/jruby/issues, or via http://bugs.jruby.org. In addition, this bug has not been updated in over two years.

        We have decided to close down these old JIRA issues.

        If your report is still a problem on current JRuby versions (1.7.18 or master/9.0.0.0), please re-file the bug at http://bugs.jruby.org.

        You can contact us on the JRuby mailing lists, Freenode IRC channel #jruby, or the @jruby Twitter account if you are unsure how to proceed.

        Show
        Charles Oliver Nutter added a comment - JRuby has moved bug tracking to Github, accessible via our Github page at https://github.com/jruby/jruby/issues , or via http://bugs.jruby.org . In addition, this bug has not been updated in over two years. We have decided to close down these old JIRA issues. If your report is still a problem on current JRuby versions (1.7.18 or master/9.0.0.0), please re-file the bug at http://bugs.jruby.org . You can contact us on the JRuby mailing lists, Freenode IRC channel #jruby, or the @jruby Twitter account if you are unsure how to proceed.

          People

          • Assignee:
            Unassigned
            Reporter:
            Charles Oliver Nutter
          • Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: