Backport #3944: Add Fiber#root? method
http://redmine.ruby-lang.org/issues/show/3944

Author: Mike Perham
Status: Open, Priority: Normal

Since the root fiber is treated differently than other Fibers (e.g. you can't yield from the root), code which can optionally use fibers for high-performance IO (in my case, the Mysql2 driver) needs Fiber#root? to know when it can use Fibers to execute a query versus using a standard blocking call.


----------------------------------------
http://redmine.ruby-lang.org