mruby/mruby — pull request #1900 by take-cheeze (2014-03-21 01:00:20+00:00)
Title: Implement Fiber#transfer.

This `Fiber#transfer` doesn't have compatibility with CRuby's.
On CRuby context has field `transferred` to check context is transferring though this version doesn't have it.
So transferred context can resume as long as it won't hit normal `resume` limit.
And transfer to root context is allowed in CRuby but on this implementation it isn't allowed.

What this `Fiber#transfer` does is that it replaces current running context with transferring context.
Since it use `fiber_resume()` internally to do it, the limitation of `transfer` is similar to `resume`.