Skip to content

Fiber#new and current Thread #1806

Description

@robin850

Hello,

There is a tiny problem with JRuby when dealing with a Fiber and a Thread object. For instance, with this code:

thread = Thread.current

Fiber.new {
  thread == Thread.current
}.resume

The fiber will yield false because JRuby spawns a new Thread calling Fiber#new. The fiber will yield true on MRI though.

Looking at the logs, the commit introducing this thread creation (i.e. 0a8680cf) is the initial commit of the RubyFiber.java file so we have no information about this.

This has been tested with JRuby 1.7.13 and current master.

Have a nice day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions