Hello,

Is it possible to detect whether a method is being called by a Fiber in
Ruby 1.9?

I hoped that there would be a Fiber.current method (just like
Thread.current), but that does not exist:

>> Fiber.methods(false).sort
=> [:new, :yield]

I need to know this information for a method that's part of an
application-level thread/fiber/task scheduler for my Ruby-VPI
project[1].  This method must either (1) run Fiber.yield (if called by a
Fiber) or (2) relay control from the Ruby interpreter to a C extension.

Thanks for your consideration.

[1] http://ruby-vpi.rubyforge.org
-- 
Posted via http://www.ruby-forum.com/.