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.
Hello,
There is a tiny problem with JRuby when dealing with a
Fiberand aThreadobject. For instance, with this code:The fiber will yield
falsebecause JRuby spawns a new Thread callingFiber#new. The fiber will yieldtrueon MRI though.Looking at the logs, the commit introducing this thread creation (i.e. 0a8680cf) is the initial commit of the
RubyFiber.javafile so we have no information about this.This has been tested with JRuby 1.7.13 and current master.
Have a nice day.