S
Suraj Kurapati
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:
=> [: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
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:
=> [: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